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

Allow setting environment variables globally #73

Open
rliebz opened this issue Apr 28, 2020 · 0 comments
Open

Allow setting environment variables globally #73

rliebz opened this issue Apr 28, 2020 · 0 comments

Comments

@rliebz
Copy link
Owner

rliebz commented Apr 28, 2020

Is your feature request related to a problem? Please describe.

In some cases, it may be desirable to set an environment variable that applies to every task. For example, adding $PWD/.bin to the PATH so that tasks can reference a local version of an executable.

Describe the solution you'd like

Likely another top-level key, environment, that would look like this:

environment:
  PATH: $PWD/.bin:$PATH

This would set the environment variables once at the start of task execution. It might make sense to name the key set-environment for consistency with the task option. The key difference here is that a top-level key could effectively be considered declarative (i.e., it describes the environment), where the task directive is necessarily imperative to resolve ambiguities around what the environment of a sub-task should look like.

Additional context

Related: #72

While this isn't a good fix long-term for specifying an interpreter, it is better ergonomically that what we have now while we figure out a better solution, and it covers a couple other use cases mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant