this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

pkg/tool/exec: Run does not exececute shell commands

It has always been an abstraction over os/exec.Command, that is,
directly calling a program with some arguments and not a shell.
The top-level godoc was misleading users into thinking
they could use shell syntax like pipes or redirections.

While here, make the cmd docs a bit clearer as well.

Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I8daa362deac7cb5380f39511f60908c9f13627b9
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200524
Reviewed-by: Matthew Sackman <matthew@cue.works>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+10 -6
+5 -3
pkg/tool/exec/exec.cue
··· 14 14 15 15 package exec 16 16 17 - // Run executes the given shell command. 17 + // Run executes a program with the given arguments. 18 18 Run: { 19 19 $id: *"tool/exec.Run" | "exec" // exec for backwards compatibility 20 20 21 - // cmd is the command to run. 21 + // cmd is a non-empty list holding the program name to run 22 + // and the arguments to be passed to it. 23 + // 22 24 // Simple commands can use a string, which is split by white space characters. 23 - // If any arguments include white space, use the list form. 25 + // If any arguments include white space, or for clarity, use the list form. 24 26 cmd: string | [string, ...string] 25 27 26 28 // dir specifies the working directory of the command.
+5 -3
pkg/tool/exec/pkg.go
··· 4 4 // 5 5 // These are the supported tasks: 6 6 // 7 - // // Run executes the given shell command. 7 + // // Run executes a program with the given arguments. 8 8 // Run: { 9 9 // $id: *"tool/exec.Run" | "exec" // exec for backwards compatibility 10 10 // 11 - // // cmd is the command to run. 11 + // // cmd is a non-empty list holding the program name to run 12 + // // and the arguments to be passed to it. 13 + // // 12 14 // // Simple commands can use a string, which is split by white space characters. 13 - // // If any arguments include white space, use the list form. 15 + // // If any arguments include white space, or for clarity, use the list form. 14 16 // cmd: string | [string, ...string] 15 17 // 16 18 // // dir specifies the working directory of the command.