diff --git a/cli/controller/deploy_functions.go b/cli/controller/deploy_functions.go index 33c1492..0fce464 100644 --- a/cli/controller/deploy_functions.go +++ b/cli/controller/deploy_functions.go @@ -91,7 +91,8 @@ func (d *Deploy) localDirs(path string) ([]string, error) { func (d *Deploy) buildFunction(name, funcDir string) error { bl := shell.NewBufferedLogger() err := shell.Exec(shell.ExecOptions{ - Args: []string{"env", "GOOS=linux", "GOARCH=arm64", "CGO_ENABLED=0", "go", "build", "-o", name, "--tags", "lambda.norpc", "--trimpath"}, + Args: []string{"go", "build", "-o", name, "--tags", "lambda.norpc", "--trimpath"}, + Env: []string{"GOOS=linux", "GOARCH=arm64", "CGO_ENABLED=0"}, WorkDir: funcDir, Logger: bl.Logger(), ShowExitCode: false,