fix(lambda): treat empty LAMBDA_ZIP_PATH as unset in build script#6462
Merged
Conversation
The Dockerfile sets `ENV LAMBDA_ZIP_PATH=$LAMBDA_ZIP_PATH` after the
`ARG` declaration. When no build arg is passed (e.g. local builds not
triggered by a release tag), this results in the env var being set to
an empty string rather than being absent.
`env::var("LAMBDA_ZIP_PATH")` returns `Ok("")` in that case, so the
build script tried to read a zip file at path `""` and panicked.
Fix by filtering out the empty-string case, falling back to the normal
download path from GitHub releases.
PSeitz
approved these changes
May 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Dockerfile sets
ENV LAMBDA_ZIP_PATH=$LAMBDA_ZIP_PATHafter theARGdeclaration. When no build arg is passed (e.g. local builds not triggered by a release tag), this results in the env var being set to an empty string rather than being absent.env::var("LAMBDA_ZIP_PATH")returnsOk("")in that case, sobuild.rstried to read a zip file at path""and panicked with:Fix by filtering out the empty-string case, treating it the same as unset and falling back to the normal download path from GitHub releases.
Test plan
--build-arg LAMBDA_ZIP_PATHcompletes successfully (downloads zip from GitHub)LAMBDA_ZIP_PATHset to a valid path still uses the local zip🤖 Generated with Claude Code