Commit cc58361e authored by Tomasz Maczukin's avatar Tomasz Maczukin

Use context.Background() to simplify the code

parent b597cef9
......@@ -297,18 +297,14 @@ func newDockerMachineCommandCtx(ctx context.Context, args ...string) *exec.Cmd {
}
commandArgs = append(commandArgs, args...)
cmd := exec.Command(dockerMachineExecutable, commandArgs...)
if ctx != nil {
cmd = exec.CommandContext(ctx, dockerMachineExecutable, commandArgs...)
}
cmd := exec.CommandContext(ctx, dockerMachineExecutable, commandArgs...)
cmd.Env = os.Environ()
return cmd
}
func newDockerMachineCommand(args ...string) *exec.Cmd {
return newDockerMachineCommandCtx(nil, args...)
return newDockerMachineCommandCtx(context.Background(), args...)
}
func NewMachineCommand() Machine {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment