Skip to content
New issue

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

documentation: env option does not override environment settings #1733

Closed
ssbarnea opened this issue Aug 2, 2024 · 1 comment
Closed

documentation: env option does not override environment settings #1733

ssbarnea opened this issue Aug 2, 2024 · 1 comment
Labels
state: duplicate Duplicates another issue.

Comments

@ssbarnea
Copy link
Contributor

ssbarnea commented Aug 2, 2024

Not sure if this is by design or a bug, but clearly specifying "env:" values does not override already defined values existing in system environment before calling taskfile.

If this is expected, it should documented in a highlighted warning notice, so people would not be surprised about its behavior.

My expectation was that it would override because I could use the shell expansion will fallback mechanism if I would not want it to override environment. With current behavior, I have no way to force taskfile to define a specific environment value and ignore system one.

  • Task version: Task version: v3.37.2
  • Operating system: any
  • Experiments enabled: no

Effective example at https://github.com/ansible/vscode-ansible/blob/main/Taskfile.yml#L17-L18 -- where we cannot force our own VIRTUAL_ENV value if the user defined his own in his shell.

@task-bot task-bot added the state: needs triage Waiting to be triaged by a maintainer. label Aug 2, 2024
ssbarnea added a commit to ansible/vscode-ansible that referenced this issue Aug 2, 2024
We do not want to accidentally use a virtualenv that was created by
the developer as this is likely to be polluted.

Related: go-task/task#1733
ssbarnea added a commit to ansible/vscode-ansible that referenced this issue Aug 2, 2024
We do not want to accidentally use a virtualenv that was created by
the developer as this is likely to be polluted.

Related: go-task/task#1733
audgirka pushed a commit to ansible/vscode-ansible that referenced this issue Aug 2, 2024
We do not want to accidentally use a virtualenv that was created by
the developer as this is likely to be polluted.

Related: go-task/task#1733
@pd93
Copy link
Member

pd93 commented Aug 3, 2024

Duplicate of #1038. There is an experiment being released soon that will invert the default behaviour. Stay tuned

@pd93 pd93 closed this as completed Aug 3, 2024
@task-bot task-bot removed the state: needs triage Waiting to be triaged by a maintainer. label Aug 3, 2024
@pd93 pd93 added the state: duplicate Duplicates another issue. label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: duplicate Duplicates another issue.
Projects
None yet
Development

No branches or pull requests

3 participants