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

A way to specify our own env loading method #1584

Open
wighawag opened this issue Apr 16, 2023 · 0 comments
Open

A way to specify our own env loading method #1584

wighawag opened this issue Apr 16, 2023 · 0 comments

Comments

@wighawag
Copy link

wighawag commented Apr 16, 2023

Currently just provide a option to load env var from the .env file

For my use case I need a different mechanism that support "MODE" where it load a multitude of .env. files. This is a relatively common pattern used by vite for example.

For now the only way I could make just work with it was to call just inside just via ldenv which will load these .env files and execute just again

See for example my deploy recipe:

deploy $MODE="local": (compile)
    ldenv just _deploy
_deploy:
    mycommand  --rpc-url $RPC_URL 

This is quite verbose

A solution that could solve this more elegantly could be great, it would also solve : #945

Note that I tried an alternative work around where I set the shell with the following

mode := "local"
export MODE := mode
set shell := ["ldenv", "sh", "-c"]

it worls and I can even set the mode via just --set mode production deploy but this is still verbose and not as clean as just deploy production

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

No branches or pull requests

1 participant