Skip to content

Commit 7fdbd36

Browse files
committed
fix local deps in plugin
1 parent d083ec3 commit 7fdbd36

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Plugins/AWSLambdaPackager/Plugin.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ struct AWSLambdaPackager: CommandPlugin {
128128
print("building \"\(product.name)\"")
129129
let buildCommand =
130130
"swift build -c \(buildConfiguration.rawValue) --product \(product.name) --static-swift-stdlib"
131-
if ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] != nil {
131+
if let localPath = ProcessInfo.processInfo.environment["LAMBDA_USE_LOCAL_DEPS"] {
132132
// when developing locally, we must have the full swift-aws-lambda-runtime project in the container
133133
// because Examples' Package.swift have a dependency on ../..
134134
// just like Package.swift's examples assume ../.., we assume we are two levels below the root project
135135
let slice = packageDirectory.pathComponents.suffix(2)
136136
try Utils.execute(
137137
executable: dockerToolPath,
138138
arguments: [
139-
"run", "--rm", "--env", "LAMBDA_USE_LOCAL_DEPS=true", "-v",
139+
"run", "--rm", "--env", "LAMBDA_USE_LOCAL_DEPS=\(localPath)", "-v",
140140
"\(packageDirectory.path())../..:/workspace", "-w",
141141
"/workspace/\(slice.joined(separator: "/"))", baseImage, "bash", "-cl", buildCommand,
142142
],

0 commit comments

Comments
 (0)