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
If set some variable with shell, and override it with task parameter, then task will in some cases use one parameter and in some - another.
Taskfile.yml
version: 3 env: SOME_PATH: '{{if not (empty .PATH_PART)}}/some/path/{{.PATH_PART}}/file.txt{{else}}{{fail "PATH_PART not set!"}}{{end}}' tasks: default: cmds: - echo _${PATH_PART}_ - echo _{{.PATH_PART}}_ - echo _${SOME_PATH}_ - echo _{{.SOME_PATH}}_
Bug reproduce steps:
$ PATH_PART=foo task PATH_PART=bar task: [default] echo _${PATH_PART}_ _foo_ task: [default] echo _bar_ _bar_ task: [default] echo _${SOME_PATH}_ _/some/path/bar/file.txt_ task: [default] echo _/some/path/foo/file.txt_ _/some/path/foo/file.txt_ $ task PATH_PART=bar template: :1:73: executing "" at <fail "PATH_PART not set!">: error calling fail: PATH_PART not set! $ PATH_PART=foo task task: [default] echo _${PATH_PART}_ _foo_ task: [default] echo _foo_ _foo_ task: [default] echo _${SOME_PATH}_ _/some/path/foo/file.txt_ task: [default] echo _/some/path/foo/file.txt_ _/some/path/foo/file.txt_
The text was updated successfully, but these errors were encountered:
Take a look at https://taskfile.dev/experiments/env-precedence
Sorry, something went wrong.
No branches or pull requests
If set some variable with shell, and override it with task parameter, then task will in some cases use one parameter and in some - another.
Taskfile.yml
Bug reproduce steps:
The text was updated successfully, but these errors were encountered: