Skip to content

Commit b95b89d

Browse files
authored
Merge pull request #247 from branfosj/develop
update table on transitioning to `run_shell_cmd` to also cover `run_cmd_qa` options
2 parents 5d17019 + 44166d3 commit b95b89d

File tree

1 file changed

+23
-28
lines changed

1 file changed

+23
-28
lines changed

docs/easybuild-v5/run_shell_cmd.md

Lines changed: 23 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -56,34 +56,29 @@ Examples:
5656
ec = res.exit_code
5757
```
5858

59-
## Transitioning from `run_cmd` to `run_shell_cmd`
59+
## Transitioning from `run_cmd` and `run_cmd_qa` to `run_shell_cmd`
6060

6161
For parameters in general, the following translation table can be used, where the default values are shown:
6262

63-
| run_cmd parameter |run_shell_cmd parameter| meaning |
64-
| ---------------------|-----------------------|---------|
65-
| `cmd` | `cmd` | command to run |
66-
| `log_all=False` | (removed) | always log command output and exit code *(now always `True`)* |
67-
| `simple=False` | (removed) | if `True`, just return `True`/`False` to indicate success *(obsolete)* |
68-
| `regexp=True` | (removed) | regex used to check the output for errors *(obsolete)* |
69-
| `log_ok=True` | `fail_on_error=True` | fail on non-zero exit code |
70-
| | `split_error=False` | split of stderr from stdout output *(new feature)*|
71-
| `inp=None` | `stdin=None` | the input given to the command via `stdin` |
72-
| | `env=None` | environment to use to run command (if `None`, inherit current process environment) *(new feature)* |
73-
| `trace=True` | `hidden=False` | don't show command in terminal output with `--trace`, or `--extended-dry-run` / `-x`) |
74-
| `force_in_dry_run=False`| `in_dry_run=False` | also run command in dry run mode |
75-
| `verbose=True` | `verbose_dry_run=False` | show that command is run in dry run mode (overrules `--hidden`) |
76-
| `path=None` | `work_dir=None` | working directory to run command in (current working directory if `None`) |
77-
| `shell=None` | `use_bash=True` | execute command through bash shell (`run_cmd` enables this for `None`)|
78-
| `log_output=False` | `output_file=True` | collect command output in temporary output file *(changed default)* |
79-
| `stream_output=None` | `stream_output=None` | stream command output to stdout (auto-enabled with `--logtostdout` if `None`) |
80-
| `asynchronous=False` | `asynchronous=False` | run command asynchronously (not yet implemented for `run_shell_cmd`)|
81-
| `with_hooks=True` | `with_hooks=True` | trigger pre/post `run_cmd` or `run_shell_cmd` hooks |
82-
| | `qa_patterns=None` | list of 2-tuples with patterns for questions + corresponding answers (not yet implemented for `run_shell_cmd`) |
83-
| | `qa_wait_patterns=None`| list of 2-tuples with patterns for non-questions and number of iterations to allow these patterns to match with end out command output (not yet implemented for `run_shell_cmd`)|
84-
85-
## Transitioning from `run_cmd_qa` to `run_shell_cmd`
86-
87-
This is still to be implemented in `run_shell_cmd`.
88-
89-
...
63+
| run_cmd / run_cmd_qa parameter | run_shell_cmd parameter | meaning |
64+
| -------------------------------|-------------------------|---------|
65+
| `cmd` | `cmd` | command to run |
66+
| `log_all=False` | (removed) | always log command output and exit code *(now always `True`)* |
67+
| `simple=False` | (removed) | if `True`, just return `True`/`False` to indicate success *(obsolete)* |
68+
| `regexp=True` | (removed) | regex used to check the output for errors *(obsolete)* |
69+
| `log_ok=True` | `fail_on_error=True` | fail on non-zero exit code |
70+
| | `split_error=False` | split of stderr from stdout output *(new feature)*|
71+
| `inp=None` | `stdin=None` | the input given to the command via `stdin` |
72+
| | `env=None` | environment to use to run command (if `None`, inherit current process environment) *(new feature)* |
73+
| `trace=True` | `hidden=False` | don't show command in terminal output with `--trace`, or `--extended-dry-run` / `-x`) |
74+
| `force_in_dry_run=False` | `in_dry_run=False` | also run command in dry run mode |
75+
| `verbose=True` | `verbose_dry_run=False` | show that command is run in dry run mode (overrules `--hidden`) |
76+
| `path=None` | `work_dir=None` | working directory to run command in (current working directory if `None`) |
77+
| `shell=None` | `use_bash=True` | execute command through bash shell (`run_cmd` enables this for `None`)|
78+
| `log_output=False` | `output_file=True` | collect command output in temporary output file *(changed default)* |
79+
| `stream_output=None` | `stream_output=None` | stream command output to stdout (auto-enabled with `--logtostdout` if `None`) |
80+
| `asynchronous=False` | `asynchronous=False` | run command asynchronously |
81+
| `with_hooks=True` | `with_hooks=True` | trigger pre/post `run_cmd` or `run_shell_cmd` hooks |
82+
| `qa` and `std_qa=None` | `qa_patterns=None` | list of 2-tuples with patterns for questions + corresponding answers |
83+
| `no_qa=None` | `qa_wait_patterns=None` | list of strings with patterns for non-questions |
84+
| `maxhits=50` | `qa_timeout=100` | amount of seconds to wait until more output is produced when there is no matching question |

0 commit comments

Comments
 (0)