-
-
Notifications
You must be signed in to change notification settings - Fork 763
Description
Description
Hi, thanks for your work on Task, it's a great tool. I’m trying to understand some behavior I’ve observed when using Task with unzip. In case I'm missing something obvious, the issue title is a good tldr.
Consider the following Taskfiles. I’ve labeled succeeding tasks as succeeds-* and failing tasks as fails-*. For failing tasks, the error message is unzip: cannot find or open <UNZIP value>, <UNZIP value>.zip or <UNZIP value>.ZIP, where <UNZIP value> is the corresponding value of the UNZIP environment variable. I would expect this error message for unzip "<UNZIP value>".
-
issue_examples/unzip_task_env/Taskfile.ymlversion: '3' vars: UNZIP: unzip tasks: succeeds-taskvar: - unzip -h > /dev/null - '{{.UNZIP}} -h > /dev/null' fails-envvar: cmds: - $UNZIP -h > /dev/null env: UNZIP: unzip fails-envvar-as-taskvar: cmds: - '{{.UNZIP}} -h > /dev/null' env: UNZIP: unzip fails-envvar-abspath: cmds: - $UNZIP -h > /dev/null env: UNZIP: /usr/bin/unzip fails-with-envvar-set: cmds: - unzip -h > /dev/null env: UNZIP: unzip
-
issue_examples/make_counterexample/Taskfile.ymlversion: '3' vars: MAKE: make tasks: succeeds-taskvar: - make -h > /dev/null - '{{.MAKE}} -h > /dev/null' - $MAKE -h > /dev/null succeeds-envvar: cmds: - make -h > /dev/null - '{{.MAKE}} -h > /dev/null' - $MAKE -h > /dev/null env: MAKE: make
-
issue_examples/unzip_global_env/Taskfile.ymlversion: '3' env: MAKE: make UNZIP: unzip tasks: succeeds-make: make -h > /dev/null && {{.MAKE}} -h > /dev/null && $MAKE -h > /dev/null fails-unzip: unzip -h > /dev/null
-
issue_examples/unzip_global_env_cli/Taskfile.ymlversion: '3' tasks: fails-unzip: echo "{{spew .UNZIP}}" && unzip -h > /dev/null
run using
$ env UNZIP=unzip task -s -t issue_examples/unzip_global_env_cli/Taskfile.yml fails-unzip (string) (len=5) unzip unzip: cannot find or open unzip, unzip.zip or unzip.ZIP.
or
$ env UNZIP=make task -s -t issue_examples/unzip_global_env_cli/Taskfile.yml fails-unzip (string) (len=4) make unzip: cannot find or open make, make.zip or make.ZIP.
-
issue_examples/unzip_task_env_lowercase/Taskfile.ymlversion: '3' vars: unzip: unzip tasks: succeeds-taskvar: - unzip -h > /dev/null - '{{.unzip}} -h > /dev/null' succeeds-envvar: cmds: - unzip -h > /dev/null - '{{.unzip}} -h > /dev/null' - $unzip -h > /dev/null env: unzip: unzip
Version
3
Operating system
linux
Experiments Enabled
no
Example Taskfile
see description