Skip to content

Commit ee3c2c0

Browse files
author
Andrew Klitzke
committed
correct package zip path
1 parent c3c5d2a commit ee3c2c0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ class RustPlugin {
4444
{}
4545
);
4646

47+
this.dockerPath = path.resolve(this.custom.dockerPath || this.servicePath);
48+
4749
// By default, Serverless examines node_modules to figure out which
4850
// packages there are from dependencies versus devDependencies of a
4951
// package. While there will always be a node_modules due to Serverless
@@ -58,15 +60,14 @@ class RustPlugin {
5860
const cargoDownloads = path.join(cargoHome, 'git');
5961

6062
const dockerCLI = process.env['SLS_DOCKER_CLI'] || 'docker';
61-
const dockerPath = path.resolve(this.custom.dockerPath || this.servicePath);
6263
const defaultArgs = [
6364
'run',
6465
'--rm',
6566
'-t',
6667
'-e',
6768
`BIN=${binary}`,
6869
`-v`,
69-
`${dockerPath}:/code`,
70+
`${this.dockerPath}:/code`,
7071
`-v`,
7172
`${cargoRegistry}:/root/.cargo/registry`,
7273
`-v`,
@@ -151,6 +152,7 @@ class RustPlugin {
151152
// see https://serverless.com/framework/docs/providers/aws/guide/packaging/
152153
// for more information
153154
const artifactPath = path.join(
155+
this.dockerPath,
154156
`target/lambda/${"dev" === profile ? "debug" : "release"}`,
155157
binary + ".zip"
156158
);

0 commit comments

Comments
 (0)