Skip to content

Commit

Permalink
Update schema and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
javierfreire committed Jan 24, 2025
1 parent 4504f1f commit 448b68d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
14 changes: 12 additions & 2 deletions docs/gossfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,18 @@ command:

`stdout` and `stderr` can be a string or [pattern](#patterns)

The `exec` attribute is the command to run; this defaults to the name of
the hash for backwards compatibility
The `exec` attribute specifies the command to run. It can be:

* A string, which will be executed through the shell (e.g., /bin/sh -c on Unix systems).
* An array of strings, where each element represents an argument. In this case, the command is invoked directly without a shell. This is
particularly useful in environments like scratch containers, which do not include a shell.
```yaml
...
exec: ["/someBinary", "argument1"]
...
```

If exec is not provided, it defaults to the name of the hash for backward compatibility.

### dns

Expand Down
10 changes: 7 additions & 3 deletions docs/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ definitions:
default: 500
examples:
- 500
# optional attributes
# optional attributesf
local-address:
type: string
default: 127.0.0.1
Expand All @@ -47,8 +47,12 @@ definitions:
type: integer
description: "Validates the exit-status and output of a command"
exec:
description: "command to execute, defaults to the hash key"
type: string
description: "command to execute, defaults to the hash key, see https://goss.rocks/gossfile#command"
oneOf:
- type: string
- type: array
items:
type: string
stdout:
type: array
description: "can be a string or pattern, see https://goss.rocks/gossfile#patterns"
Expand Down

0 comments on commit 448b68d

Please sign in to comment.