Skip to content

Commit

Permalink
packer: pass command line args
Browse files Browse the repository at this point in the history
  • Loading branch information
jm33-m0 committed Jan 2, 2021
1 parent 6fe7379 commit b062cc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packer/cmd/stub/stub.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func runFromMemory(procName string, buffer []byte) {
syscall.Dup2(int(file.Fd()), int(os.Stdin.Fd()))
file.Close()

_ = syscall.Exec(fdPath, []string{procName}, nil)
progWithArgs := append([]string{procName}, os.Args[1:]...)
_ = syscall.Exec(fdPath, progWithArgs, nil)
}

func main() {
Expand Down

0 comments on commit b062cc2

Please sign in to comment.