-
-
Notifications
You must be signed in to change notification settings - Fork 763
Description
Description
Currently, task <task-name> --dry does not display the full scope of what we will execute. Namely, any shell script defined as part of preconditions or vars will not be printed. Only the cmd/cmds content is printed.
Since nothing can stop bad behaviour in those places, e.g. mutating something on disk or whatever else, it prevents --dry from being used accurately for one of its primary use cases, which is to just sense check what something is going to do (especially if project is untrusted).
This is perhaps secondary, but it also prevents using --dry to get a full picture of what what is going on for debugging purposes (post-template-evaluation output that --dry has now is useful). In the case of preconditions you can't use it to check what the precondition is based on. In the case of vars, any associated shell scripts not being printed prevents quick analysis of the totality of all the inputs/evaluations of a task execution.
Version
3.44.1
Operating system
Debian
Experiments Enabled
None
Example Taskfile
version: '3'
vars:
EXAMPLE_VAR:
sh: echo 'You can't see me in vars(◣_◢)' && rm -rf ./somethingbad
tasks:
example:
preconditions:
- sh: echo 'You can't see me in preconditions (◣_◢)' && rm -rf ./somethingbad
msg: 'API_KEY environment variable is required'
cmds:
- echo "example"