diff --git a/config.md b/config.md index 01fb120..357f319 100644 --- a/config.md +++ b/config.md @@ -155,8 +155,11 @@ For POSIX platforms the `mounts` structure has the following fields: * **`cwd`** (string, REQUIRED) is the working directory that will be set for the executable. This value MUST be an absolute path. * **`env`** (array of strings, OPTIONAL) with the same semantics as [IEEE Std 1003.1-2008's `environ`][ieee-1003.1-2008-xbd-c8.1]. -* **`args`** (array of strings, REQUIRED) with similar semantics to [IEEE Std 1003.1-2008 `execvp`'s *argv*][ieee-1003.1-2008-functions-exec]. - 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*. +* **`args`** (array of strings, OPTIONAL) with similar semantics to [IEEE Std 1003.1-2008 `execvp`'s *argv*][ieee-1003.1-2008-functions-exec]. + 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. +* **`commandLine`** (string, OPTIONAL) specifies the full command line to be executed on Windows. + 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. + ### POSIX process diff --git a/schema/config-schema.json b/schema/config-schema.json index f90bd4b..e3d6096 100644 --- a/schema/config-schema.json +++ b/schema/config-schema.json @@ -50,13 +50,15 @@ "process": { "type": "object", "required": [ - "cwd", - "args" + "cwd" ], "properties": { "args": { "$ref": "defs.json#/definitions/ArrayOfStrings" }, + "commandLine": { + "type": "string" + }, "consoleSize": { "type": "object", "required": [ diff --git a/specs-go/config.go b/specs-go/config.go index 6d791e7..27268f9 100644 --- a/specs-go/config.go +++ b/specs-go/config.go @@ -38,7 +38,9 @@ type Process struct { // User specifies user information for the process. User User `json:"user"` // Args specifies the binary and arguments for the application to execute. - Args []string `json:"args"` + Args []string `json:"args,omitempty"` + // CommandLine specifies the full command line for the application to execute on Windows. + CommandLine string `json:"commandLine,omitempty" platform:"windows"` // Env populates the process environment for the process. Env []string `json:"env,omitempty"` // Cwd is the current working directory for the process and must be