Skip to content

Commit 29686db

Browse files
Merge pull request #998 from jhowardmsft/jjh/commandline
Windows:Have native CommandLine in Process
2 parents 1722abf + deb4d95 commit 29686db

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

config.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,11 @@ For POSIX platforms the `mounts` structure has the following fields:
155155
* **`cwd`** (string, REQUIRED) is the working directory that will be set for the executable.
156156
This value MUST be an absolute path.
157157
* **`env`** (array of strings, OPTIONAL) with the same semantics as [IEEE Std 1003.1-2008's `environ`][ieee-1003.1-2008-xbd-c8.1].
158-
* **`args`** (array of strings, REQUIRED) with similar semantics to [IEEE Std 1003.1-2008 `execvp`'s *argv*][ieee-1003.1-2008-functions-exec].
159-
This specification extends the IEEE standard in that at least one entry is REQUIRED, and that entry is used with the same semantics as `execvp`'s *file*.
158+
* **`args`** (array of strings, OPTIONAL) with similar semantics to [IEEE Std 1003.1-2008 `execvp`'s *argv*][ieee-1003.1-2008-functions-exec].
159+
This specification extends the IEEE standard in that at least one entry is REQUIRED (non-Windows), and that entry is used with the same semantics as `execvp`'s *file*. This field is OPTIONAL on Windows, and `commandLine` is REQUIRED if this field is omitted.
160+
* **`commandLine`** (string, OPTIONAL) specifies the full command line to be executed on Windows.
161+
This is the preferred means of supplying the command line on Windows. If omitted, the runtime will fall back to escaping and concatenating fields from `args` before making the system call into Windows.
162+
160163

161164
### <a name="configPOSIXProcess" />POSIX process
162165

schema/config-schema.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,15 @@
5050
"process": {
5151
"type": "object",
5252
"required": [
53-
"cwd",
54-
"args"
53+
"cwd"
5554
],
5655
"properties": {
5756
"args": {
5857
"$ref": "defs.json#/definitions/ArrayOfStrings"
5958
},
59+
"commandLine": {
60+
"type": "string"
61+
},
6062
"consoleSize": {
6163
"type": "object",
6264
"required": [

specs-go/config.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ type Process struct {
3838
// User specifies user information for the process.
3939
User User `json:"user"`
4040
// Args specifies the binary and arguments for the application to execute.
41-
Args []string `json:"args"`
41+
Args []string `json:"args,omitempty"`
42+
// CommandLine specifies the full command line for the application to execute on Windows.
43+
CommandLine string `json:"commandLine,omitempty" platform:"windows"`
4244
// Env populates the process environment for the process.
4345
Env []string `json:"env,omitempty"`
4446
// Cwd is the current working directory for the process and must be

0 commit comments

Comments
 (0)