We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
env
vars
platforms
The env and vars sections of a task are always resolved, even if the the current platform is not listed in platforms.
This is reproducible using the following Taskfile.
version: 3 tasks: default: - task: windows - task: darwin windows: internal: true platforms: - windows env: EXAMPLE_ENV: sh: exit 1 vars: EXAMPLE_VAR: sh: exit 2 cmds: - echo Windows darwin: internal: true platforms: - darwin cmds: - echo Darwin
The issue is shown in the following output.
$ uname Darwin $ task task: Failed to run task "default": task: Command "exit 2" failed: exit status 2
This is problematic when setting a value to the output of a platform-specific command (e.g. the output of mktemp, which is not available on Windows).
mktemp
The text was updated successfully, but these errors were encountered:
It's possible to workaround this issue by using the Go template engine (e.g. {{if eq OS "windows"}}command{{end}}).
{{if eq OS "windows"}}command{{end}}
Sorry, something went wrong.
Hi @JamieEdge,
Thanks for reporting. Fixed by #1377.
Successfully merging a pull request may close this issue.
The
env
andvars
sections of a task are always resolved, even if the the current platform is not listed inplatforms
.This is reproducible using the following Taskfile.
The issue is shown in the following output.
This is problematic when setting a value to the output of a platform-specific command (e.g. the output of
mktemp
, which is not available on Windows).The text was updated successfully, but these errors were encountered: