Skip to content

Commit

Permalink
fix: -exec handle 1st arg (#262)
Browse files Browse the repository at this point in the history
  • Loading branch information
powerman authored Jan 25, 2023
1 parent 08155d6 commit 362232e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func main() { //nolint:gocyclo,gocognit,funlen // TODO Refactor?
case cfg.exec:
arg0, err := exec.LookPath(flag.Arg(0))
if err == nil {
err = syscall.Exec(arg0, flag.Args()[1:], os.Environ()) //nolint:gosec // False positive.
err = syscall.Exec(arg0, flag.Args(), os.Environ()) //nolint:gosec // False positive.
}
if err != nil {
fatalf("Failed to run command: %s.", err)
Expand Down

0 comments on commit 362232e

Please sign in to comment.