Skip to content

Commit

Permalink
Run by sh -c
Browse files Browse the repository at this point in the history
  • Loading branch information
sachaos committed Aug 18, 2021
1 parent 8f3e432 commit 85115d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ func (s *Snapshot) run(finishedQueue chan<- int64) error {

var b bytes.Buffer

command := exec.Command(s.command, s.args...)
commands := []string{s.command}
commands = append(commands, s.args...)

command := exec.Command("sh", "-c", strings.Join(commands, " "))
command.Stdout = &b

if err := command.Start(); err != nil {
Expand Down

0 comments on commit 85115d7

Please sign in to comment.