Skip to content

Commit

Permalink
fix(packaging): Consider absolute artifact paths (#8325)
Browse files Browse the repository at this point in the history
  • Loading branch information
rib committed Oct 2, 2020
1 parent dd9a011 commit 904c2c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plugins/package/lib/packageService.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ module.exports = {

// use the artifact in function config if provided
if (funcPackageConfig.artifact) {
const filePath = path.join(this.serverless.config.servicePath, funcPackageConfig.artifact);
const filePath = path.resolve(this.serverless.config.servicePath, funcPackageConfig.artifact);
functionObject.package.artifact = filePath;
return BbPromise.resolve(filePath);
}

// use the artifact in service config if provided
// and if the function is not set to be packaged individually
if (this.serverless.service.package.artifact && !funcPackageConfig.individually) {
const filePath = path.join(
const filePath = path.resolve(
this.serverless.config.servicePath,
this.serverless.service.package.artifact
);
Expand Down

0 comments on commit 904c2c1

Please sign in to comment.