MCPcopy Create free account
hub / github.com/gokcehan/lf / shellCommand

Function shellCommand

os.go:143–153  ·  view source on GitHub ↗
(s string, args []string)

Source from the content-addressed store, hash-verified

141}
142
143func shellCommand(s string, args []string) *exec.Cmd {
144 if len(gOpts.ifs) != 0 {
145 s = fmt.Sprintf("IFS='%s'; %s", gOpts.ifs, s)
146 }
147
148 args = append([]string{gOpts.shellflag, s, "--"}, args...)
149
150 args = append(gOpts.shellopts, args...)
151
152 return exec.Command(gOpts.shell, args...)
153}
154
155func shellSetPG(cmd *exec.Cmd) {
156 cmd.SysProcAttr = &unix.SysProcAttr{Setpgid: true}

Callers 1

runShellMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected