Skip to content

Commit

Permalink
Merge branch 'main' into maint/main/update-osinfo-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveL-MSFT authored Sep 1, 2023
2 parents 800172c + fb3ef20 commit 7d88872
Show file tree
Hide file tree
Showing 50 changed files with 2,719 additions and 863 deletions.
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,15 @@
"./test_group_resource/Cargo.toml",
"./y2j/Cargo.toml"
],
"rust-analyzer.showUnlinkedFileNotification": true
"rust-analyzer.showUnlinkedFileNotification": true,
"json.schemas": [
{
"fileMatch": ["**/*.dsc.resource.json"],
"url": "/schemas/2023/08/bundled/resource/manifest.vscode.json"
}
],
"yaml.schemas": {
"schemas/2023/08/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}",
"schemas/2023/08/bundled/resource/manifest.vscode.json": "**.dsc.resource.{yaml,yml}"
}
}
15 changes: 15 additions & 0 deletions docs/reference/cli/dsc.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,21 @@ Type: Boolean
Mandatory: false
```
## Exit Codes
The `dsc` command uses semantic exit codes. Each exit code represents a different result for the
execution of the command.

| Exit Code | Meaning |
| :-------: | :------------------------------------------------------------------------------------------------------ |
| `0` | The command executed successfully without any errors. |
| `1` | The command failed because it received invalid arguments. |
| `2` | The command failed because a resource raised an error. |
| `3` | The command failed because a value couldn't be serialized to or deserialized from JSON. |
| `4` | The command failed because input for the command wasn't valid YAML or JSON. |
| `5` | The command failed because a resource definition or instance value was invalid against its JSON schema. |
| `6` | The command was cancelled by a <kbd>Ctrl</kbd>+<kbd>C</kbd> interruption. |

[01]: config/command.md
[02]: resource/command.md
[03]: schema/command.md
8 changes: 7 additions & 1 deletion dsc/assertion.dsc.resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
"return": "state"
},
"exitCodes": {
"0": "Success"
"0": "Success",
"1": "Invalid argument",
"2": "Resource error",
"3": "JSON Serialization error",
"4": "Invalid input format",
"5": "Resource instance failed schema validation",
"6": "Command cancelled"
},
"schema": {
"command": {
Expand Down
8 changes: 7 additions & 1 deletion dsc/group.dsc.resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@
"return": "state"
},
"exitCodes": {
"0": "Success"
"0": "Success",
"1": "Invalid argument",
"2": "Resource error",
"3": "JSON Serialization error",
"4": "Invalid input format",
"5": "Resource instance failed schema validation",
"6": "Command cancelled"
},
"validate": {
"executable": "dsc",
Expand Down
8 changes: 7 additions & 1 deletion dsc/parallel.dsc.resource.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@
"return": "state"
},
"exitCodes": {
"0": "Success"
"0": "Success",
"1": "Invalid argument",
"2": "Resource error",
"3": "JSON Serialization error",
"4": "Invalid input format",
"5": "Resource instance failed schema validation",
"6": "Command cancelled"
},
"validate": {
"executable": "dsc",
Expand Down
Loading

0 comments on commit 7d88872

Please sign in to comment.