Environment variables with escape characters get modified during railway deployment ?
I set an environment variable like this
/vercel\.app$/
However, when I print my variable using console.log whens trating my app. I got this
'/vercel\\.app$/'
Why is the escape character doubled ?
Thank you,12 Replies
Project ID:
b77771e8-a1f4-4676-a824-36c14d7facfa
b77771e8-a1f4-4676-a824-36c14d7facfa
project ID: b77771e8-a1f4-4676-a824-36c14d7facfa
there's an extra backslash to escape the period?, I don't see how this is an issue?
Sorry, there was an error in my original message.
In my original message, the text was interpreted by the editor. I edited it and added it within a code block, so you can see the issue
One escape character is changed into two escape characters. How we can enter in the environement gui a text that will not be reinterpreted/modified by Railways editor
try using the raw editor
Imposible, I am told the json is invalid
the editor automaically add a double escape to make it a valid json
use the k=v format, not the json format
i'll try and let you know
thanks
and if it's still escaping, its plenty easy enough to code around in your app
This is still escaping. Clearly I could code around, but I would expect from railway a proper solution
not liking that attitude tbh
Don't take it personally, but I spent a few hours figuring out that issue, and I didn't see any hint in the documentation telling that the env variables are handled as a json rather than a string