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

Load(source) environment variables from a file as configuration file. #98

Open
elyoni opened this issue Jan 26, 2024 · 1 comment · May be fixed by #104
Open

Load(source) environment variables from a file as configuration file. #98

elyoni opened this issue Jan 26, 2024 · 1 comment · May be fixed by #104

Comments

@elyoni
Copy link

elyoni commented Jan 26, 2024

Hello, and thank you. Your application is one of the best, and I use it every day for many of my projects. I'd like to suggest a new feature to load environment variables from a file. With this feature, we can use the same tusk.yml file for every project and only need to change the environment variables file.

The configuration file name will be specified at the top level of the tusk.yml file. Additionally, it can be optional; if the file exists, it will be loaded.

Thanks

@smyrman
Copy link

smyrman commented Jan 31, 2024

Potential workaround when the issue is ongoing.

What we do four our own tusk file, is that for tasks that needs it, we source the file through the shell:

  run:
      - |
        set -e
        source ${resources}/docker-compose.gotest.env

This works if the env file is simple enough, but it does support comments with a # prefix..

@rliebz rliebz linked a pull request Apr 9, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants