Skip to content

Commit 3b6a5ab

Browse files
committed
feat(run): add OS variable to use case context (#3)
1 parent b8c089a commit 3b6a5ab

5 files changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ All steps are working with a context object that is empty initially. Whenever
317317
a use case starts, the context is filled with the following properties.
318318
Throughout execution, steps can add or modify properties in the context object.
319319

320+
- `OS`: the operating system where the CLI is executed on; represents the result of [`process.platform`](https://nodejs.org/api/process.html#process_process_platform)
320321
- `WORKSPACE_PATH`: the absolute path to the workspace
321322
- `WORKING_DIR`: the absolute path to the working directory, see [Workspace structure](#workspace-structure)
322323
- `SERVERS`: the list of all servers, see [Server configuration](#server-configuration)

assets/templates/config/use-cases/check-requirements.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
"name": "Check requirements",
55
"description": "This use case checks the requirements to develop locally.",
66
"steps": [
7+
{
8+
"type": "FORMULA",
9+
"description": "Print OS info",
10+
"formula": "console.log(`Running on ${OS}`)"
11+
},
712
{
813
"type": "COMMAND",
914
"description": "Execute commands",

0 commit comments

Comments
 (0)