May 9, 2023, 4:59am
The docs give an example of a secret set as an environment variable prefixed with a dollar sign
Are they actually prefixed with a dollar sign, or are the docs just showing how to access an environment variable in a shell?
If the environment variables are prefixed with a dollar sign, how the heck do you set an environment variable that starts with a dollar in your own shell for testing purposes?
The docs page, for reference:
Secrets and Fly Apps · Fly Docs
It’s showing how to access the variable in a shell. I’m not sure if this is the correct thing to do there!
But I also don’t think it’s possible to actually set an environment variable that starts with a dollar sign, at least in a POSIX-compatible shell. (It is possible in Fly.io VMs though if you set it in your fly.toml, if you really want to do that…)
May 9, 2023, 2:24pm
That dollar sign seems unnecessary. I’ve removed it (forgiveness/permission and all that).
Bash/zsh users will know to add the dollar sign.
Powershell users will add
May 9, 2023, 7:51pm
Thanks for sorting that out.
I thought it was just showing shell variable syntax, but I did spend way to much time trying to set a shell variable starting with a dollar sign. ¯_(ツ)_/¯
May 16, 2023, 7:51pm
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.