File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -304,11 +304,9 @@ function installAllRequirements() {
304
304
this . servicePath , f . module , this . options , this . serverless
305
305
) ;
306
306
// Add symlinks into .serverless for each module so it's easier for injecting and for users to see where reqs are
307
- if ( reqsInstalledAt ) {
308
- fse . symlink (
309
- reqsInstalledAt ,
310
- path . join ( this . servicePath , '.serverless' , `${ f . module } _requirements` )
311
- ) ;
307
+ let symlinkPath = path . join ( this . servicePath , '.serverless' , `${ f . module } _requirements` ) ;
308
+ if ( reqsInstalledAt && ! fse . existsSync ( symlinkPath ) ) {
309
+ fse . symlink ( reqsInstalledAt , symlinkPath ) ;
312
310
}
313
311
doneModules . push ( f . module ) ;
314
312
}
@@ -318,8 +316,9 @@ function installAllRequirements() {
318
316
this . servicePath , '' , this . options , this . serverless
319
317
) ;
320
318
// Add symlinks into .serverless for so it's easier for injecting and for users to see where reqs are
321
- if ( reqsInstalledAt ) {
322
- fse . symlink ( reqsInstalledAt , path . join ( this . servicePath , '.serverless' , `_requirements` ) ) ;
319
+ let symlinkPath = path . join ( this . servicePath , '.serverless' , `_requirements` ) ;
320
+ if ( reqsInstalledAt && ! fse . existsSync ( symlinkPath ) ) {
321
+ fse . symlink ( reqsInstalledAt , symlinkPath ) ;
323
322
}
324
323
}
325
324
} ;
You can’t perform that action at this time.
0 commit comments