6 months ago
Hi, I can get the shell to echo env variables, but not the run command, am I using it wrong?
no variable displayed using run:
(base) $ railway run echo "HELLO $RAILWAY_ENVIRONMENT"
HELLO
but works in the shell (properly shows prod)...
(base) $ railway shell
Entering subshell with Railway variables available. Type 'exit' to exit.
The default interactive shell is now zsh.
To update your account to use zsh, please run chsh -s /bin/zsh.
For more details, please visit https://support.apple.com/kb/HT208050.
bash-3.2$ echo "HELLO $RAILWAY_ENVIRONMENT"
HELLO prod
3 Replies
6 months ago
Hey there! We've found the following might help you get unblocked faster:
If you find the answer from one of these, please let us know by solving the thread!
6 months ago
Apologies but this looks like an issue with the application level code. Due to volume, we can only answer platform level issues.
I've made this thread public so that the community might be able to help with you query.
Status changed to Awaiting User Response Railway • 6 months ago
6 months ago
It just looks like railway run can't accss environmental variables while railway shell can. Am I using railway run wrong somehow? they're running in the same environment, there's no application level difference between them.
Status changed to Solved fengning-starsend • 6 months ago