R
Railway13mo ago
BerL

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
Percy
Percy13mo ago
Project ID: b77771e8-a1f4-4676-a824-36c14d7facfa
BerL
BerL13mo ago
b77771e8-a1f4-4676-a824-36c14d7facfa project ID: b77771e8-a1f4-4676-a824-36c14d7facfa
Brody
Brody13mo ago
there's an extra backslash to escape the period?, I don't see how this is an issue?
BerL
BerL13mo ago
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
Brody
Brody13mo ago
try using the raw editor
BerL
BerL13mo ago
Imposible, I am told the json is invalid the editor automaically add a double escape to make it a valid json
Brody
Brody13mo ago
use the k=v format, not the json format
BerL
BerL13mo ago
i'll try and let you know thanks
Brody
Brody13mo ago
and if it's still escaping, its plenty easy enough to code around in your app
BerL
BerL13mo ago
This is still escaping. Clearly I could code around, but I would expect from railway a proper solution
Brody
Brody13mo ago
not liking that attitude tbh
BerL
BerL13mo ago
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
Want results from more Discord servers?
Add your server