diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/utils.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/utils.go b/utils/utils.go index 095370a08..d1374a39a 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -224,3 +224,12 @@ func MovePauseProcessToScope(pausePidPath string) { } } } + +// CreateSCPCommand takes an existing command, appends the given arguments and returns a configured podman command for image scp +func CreateSCPCommand(cmd *exec.Cmd, command []string) *exec.Cmd { + cmd.Args = append(cmd.Args, command...) + cmd.Env = os.Environ() + cmd.Stderr = os.Stderr + cmd.Stdout = os.Stdout + return cmd +} |