Skip to content

Commit

Permalink
Print arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
maximumadmin committed Jun 12, 2021
1 parent 9f90801 commit 4d0de80
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/zram/exec.go
Expand Up @@ -16,7 +16,10 @@ func execute(command string, arg ...string) error {
if err != nil {
msg := strings.TrimSpace(stderr.String())
if len(msg) == 0 {
msg = fmt.Sprintf("failed to execute \"%s\"", command)
msg = fmt.Sprintf(
"failed to execute \"%s\"",
strings.Join(append([]string{command}, arg...), " "),
)
}
return errors.New(msg)
}
Expand Down

0 comments on commit 4d0de80

Please sign in to comment.