mirror of
https://github.com/linka-cloud/d2vm.git
synced 2025-06-23 22:02:25 +00:00
refactoring: explicit docker commands
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
@ -29,6 +29,14 @@ var (
|
||||
CommandContext = exec.CommandContext
|
||||
)
|
||||
|
||||
func SetDebug(debug bool) {
|
||||
if debug {
|
||||
Run = RunStdout
|
||||
} else {
|
||||
Run = RunNoOut
|
||||
}
|
||||
}
|
||||
|
||||
func RunStdout(ctx context.Context, c string, args ...string) error {
|
||||
cmd := exec.CommandContext(ctx, c, args...)
|
||||
cmd.Stdout = os.Stdout
|
||||
|
Reference in New Issue
Block a user