Skip to content

Commit

Permalink
move env to ExecOptions
Browse files Browse the repository at this point in the history
the env command is not available on windows
  • Loading branch information
djelusic committed Mar 10, 2022
1 parent 33695cd commit 8523c05
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/controller/deploy_functions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8523c05

Please sign in to comment.