File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,15 @@ type Cmd struct {
152
152
// followed by the elements of arg, so arg should not include the
153
153
// command name itself. For example, Command("echo", "hello").
154
154
// Args[0] is always name, not the possibly resolved Path.
155
+ //
156
+ // On Windows, processes receive the whole command line as a single string
157
+ // and do their own parsing. Command combines and quotes Args into a command
158
+ // line string with an algorithm compatible with applications using
159
+ // CommandLineToArgvW (which is the most common way). Notable exceptions are
160
+ // msiexec.exe and cmd.exe (and thus, all batch files), which have a different
161
+ // unquoting algorithm. In these or other similar cases, you can do the
162
+ // quoting yourself and provide the full command line in SysProcAttr.CmdLine,
163
+ // leaving Args empty.
155
164
func Command (name string , arg ... string ) * Cmd {
156
165
cmd := & Cmd {
157
166
Path : name ,
You can’t perform that action at this time.
0 commit comments