github.com/jfrog/jfrog-cli-core/v2@v2.51.0/utils/coreutils/excecutils.go (about) 1 package coreutils 2 3 import ( 4 "io" 5 "os/exec" 6 ) 7 8 // Command used to execute general commands. 9 type GeneralExecCmd struct { 10 ExecPath string 11 Command []string 12 } 13 14 func (pluginCmd *GeneralExecCmd) GetCmd() *exec.Cmd { 15 var cmd []string 16 cmd = append(cmd, pluginCmd.ExecPath) 17 cmd = append(cmd, pluginCmd.Command...) 18 return exec.Command(cmd[0], cmd[1:]...) 19 } 20 21 func (pluginCmd *GeneralExecCmd) GetEnv() map[string]string { 22 return map[string]string{} 23 } 24 25 func (pluginCmd *GeneralExecCmd) GetStdWriter() io.WriteCloser { 26 return nil 27 } 28 29 func (pluginCmd *GeneralExecCmd) GetErrWriter() io.WriteCloser { 30 return nil 31 }