Skip to content

Commit

Permalink
fix(index): handle astrix patterns (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
ranrib authored Jun 28, 2023
1 parent 9d1537d commit 90a4320
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ class PackageExternal {
// Symlink external folders
return Promise.all(this.options.external.map(externalFolder => {
this.symlinked = true;
return symlink.createFolder(externalFolder, this.serverless);
const folderWithoutAstrix = externalFolder.split('*').join('');
return symlink.createFolder(folderWithoutAstrix, this.serverless);
}))
.then(() => {
this.serverless.cli.log(`[serverless-package-external] is complete`);
Expand All @@ -57,7 +58,8 @@ class PackageExternal {
if(this.symlinked) {
this.serverless.cli.log(`[serverless-package-external] cleaning up`);
this.options.external.forEach(externalFolder => {
const target = path.basename(externalFolder);
const folderWithoutAstrix = externalFolder.split('*').join('');
const target = path.basename(folderWithoutAstrix);
symlink.removeFolder(target);
});
}
Expand Down

0 comments on commit 90a4320

Please sign in to comment.