mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Merge pull request #936 from arithmetric/feature/fix_install_link_error
Fixes 'file already exists' on install
This commit is contained in:
commit
7745ca1c65
@ -164,7 +164,7 @@ module.exports = function(S) {
|
||||
.then(() => fse.copyAsync(S.getServerlessPath('templates', 'nodejs', 'package.json'), path.join(tmpDir, 'package.json')))
|
||||
.then(() => BbPromise.fromCallback(cb => exec('npm install ' + projName, cb)))
|
||||
.then(() => fse.moveAsync(path.join(tmpDir, 'node_modules', projName), path.join(userCwd, projName)))
|
||||
.then(() => fse.moveAsync(path.join(tmpDir, 'node_modules'), path.join(userCwd, projName, 'node_modules')))
|
||||
.then(() => fse.copyAsync(path.join(tmpDir, 'node_modules'), path.join(userCwd, projName, 'node_modules')))
|
||||
.then(() => process.chdir(userCwd))
|
||||
.then(() => fse.removeAsync(tmpDir));
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user