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
Unable to override dotenv file loaded using $ENV value, as per the example in the docs #1596
Comments
I am experiencing the same bug. |
Hello @toby-griffiths To do what you are trying to do, you need to use the default fonction in the go templating. This is working : # Taskfile
version: '3'
env:
ENV: '{{.ENV | default "testing"}}'
dotenv: ['.env', '{{.ENV}}/.env']
tasks:
greet:
cmds:
- echo "Using $KEYNAME and endpoint $ENDPOINT"
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following the example in this docs here I've created the following files
If I run
task greet
, I get…If I run
ENV=wibble task greet
, I get…I would expect that if I set ENV=wibble I should see env vars from the
wibble/.env
file, but I cannot get this working.No matter what I try, I cannot get this working other than changing the env value in the Taskfile itself to get the alternative env var values.
Am I missing something obvious, or is this a bug?
The text was updated successfully, but these errors were encountered: