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
switch_context: desc: "Switch to a different context." vars: NEW_CONTEXT_NAME: "{{.NEW_CONTEXT_NAME | default ``}}" cmds: - echo 'Switching to context:' '{{.NEW_CONTEXT_NAME}}' - echo 'Switching to context:{{.NEW_CONTEXT_NAME}}' - echo 'Switching to context: {{.NEW_CONTEXT_NAME}}' - sed -i.bak 's/^export CONTEXT_NAME=.*/export CONTEXT_NAME="{{.NEW_CONTEXT_NAME}}"/' "{{.ROOT_DIR}}/.envrc.context" - rm "{{.ROOT_DIR}}/.envrc.context.bak" - direnv allow "{{.ROOT_DIR}}"
The third echo will cause syntax errors. Why?
The text was updated successfully, but these errors were encountered:
The sequence ": " seems to be interpreted as a YAML Map which contradicts the Taskfile schema (where commands should be a string). The following work:
version: '3' tasks: foo: vars: BAR: '{{.BAR | default "foo"}}' cmds: - echo {{.BAR}} - echo 'message:{{.BAR}}' - echo message:\ {{.BAR}} - echo 'message:\ {{.BAR}}' - "echo message: {{.BAR}}" - | echo message: {{.BAR}} - > echo message: {{.BAR}}
I guess that is your problem.
Sorry, something went wrong.
@trulede is right!
No branches or pull requests
The third echo will cause syntax errors. Why?
The text was updated successfully, but these errors were encountered: