mirror of
https://github.com/meteor/meteor.git
synced 2026-05-02 03:01:46 -04:00
Don't symlink node_modules on Windows
because symlinking is hard
This commit is contained in:
committed by
Sashko Stubailo
parent
9db7c37737
commit
70392aec79
@@ -323,10 +323,16 @@ _.extend(Builder.prototype, {
|
||||
throw new Error("can't copy only specific paths with a single symlink");
|
||||
}
|
||||
|
||||
var canSymlink = true;
|
||||
if (self.usedAsFile[normOptionsTo]) {
|
||||
throw new Error("tried to copy a directory onto " + normOptionsTo +
|
||||
" but it is is already a file");
|
||||
}
|
||||
|
||||
var canSymlink = true;
|
||||
// Symlinks don't work exactly the same way on Windows, and furthermore
|
||||
// they request Admin permissions to set.
|
||||
if (process.platform === 'win32') {
|
||||
canSymlink = false;
|
||||
} else if (normOptionsTo in self.usedAsFile) {
|
||||
// It's already here and is a directory, maybe because of a call to
|
||||
// reserve with {directory: true}. If it's an empty directory, this is
|
||||
|
||||
@@ -1682,8 +1682,9 @@ _.extend(ServerTarget.prototype, {
|
||||
// install' using the above package.json and npm-shrinkwrap.json on every
|
||||
// rebuild).
|
||||
if (options.includeNodeModulesSymlink) {
|
||||
builder.write('node_modules', {
|
||||
symlink: files.pathJoin(files.getDevBundle(), 'server-lib', 'node_modules')
|
||||
builder.copyDirectory({
|
||||
from: files.pathJoin(files.getDevBundle(), 'lib', 'node_modules'),
|
||||
to: 'node_modules'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user