Skip to content

Commit

Permalink
fix: keep environment if --ignore .Environment
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Jan 27, 2024
1 parent 28c13f4 commit 879a297
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ func (app *App) Deploy(ctx context.Context, opt *DeployOption) error {
confIn := &lambda.UpdateFunctionConfigurationInput{
DeadLetterConfig: fn.DeadLetterConfig,
Description: fn.Description,
Environment: fn.Environment,
EphemeralStorage: fn.EphemeralStorage,
FunctionName: fn.FunctionName,
FileSystemConfigs: fn.FileSystemConfigs,
Expand All @@ -153,13 +154,6 @@ func (app *App) Deploy(ctx context.Context, opt *DeployOption) error {
ImageConfig: fn.ImageConfig,
SnapStart: fn.SnapStart,
}
if env := fn.Environment; env == nil || env.Variables == nil {
confIn.Environment = &types.Environment{
Variables: map[string]string{}, // set empty variables explicitly
}
} else {
confIn.Environment = env
}

var newerVersion string
if !opt.DryRun {
Expand Down

0 comments on commit 879a297

Please sign in to comment.