Skip to content

Commit

Permalink
feat(exec_utils): Add print to dry run with sudo password
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Jun 25, 2023
1 parent 2f47bbe commit a155d44
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/utils/exec_utils/exec_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ func Exec(taskInput libtask.TaskInput, cmd string, args ...string) error {
dryArgs = append(dryArgs, arg)
}
}
if taskInput.SudoPassword != "" {
fmt.Printf("echo %s | ", taskInput.SudoPassword)
}
fmt.Println(strings.Join(append([]string{cmd}, dryArgs...), " "))
return nil
}
Expand Down

0 comments on commit a155d44

Please # to comment.