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

[FEATURE REQUEST] make shell respect local .env files (configurable with flag overrides) #423

Open
alexng353 opened this issue Apr 29, 2023 · 2 comments
Labels
feature request Proposed feature for the CLI

Comments

@alexng353
Copy link
Contributor

proposal:
allow shell users to override/supplement railway variables with local .env's

features:

  • flags
    • --envfile={path} env file to use, defaults to these, in this order: railway.env, .env.local, .local.env, .env
    • --prefer-remote override namespace collisions with railway variables
    • --prefer-local override namespace collisions with local variables
  • can consume JSON formatted files (single level depth)
  • can consome kv formatted files (default .env styling)

defaults to prefer remote if there are namespace collisions without a prefer specified
respecting local .env files is disabled by default

@half0wl
Copy link
Contributor

half0wl commented May 23, 2023

What's the motivation behind this? I'm curious about the purpose of this as railway shell is meant for spawning a shell with (remote) Railway variables - is there a use case for wanting local variables inside the shell?

namespace collisions

Can you elaborate on this bit?

@half0wl half0wl added enhancement New feature or request feature request Proposed feature for the CLI and removed enhancement New feature or request labels May 23, 2023
@alexng353
Copy link
Contributor Author

namespace collisions

Can you elaborate on this bit?

Sorry for the late reply, but I meant handling what happens when both railway and the local .env file have name collisions.

i.e. railway has API_KEY="hi james" and .env.local has API_KEY="hi john" there could be flags that change how the collisions are rectified

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

No branches or pull requests

2 participants