Setting Heroku config vars that contain the special character $
Asked Answered
C

1

12

I am trying to set a Heroku config variable that contains the special character $ but I do not know how to properly escape it. I tried encapsulating it in quotes but got the same result.

Example:

heroku config:set EMAIL_PASSWORD=xxxxx$xxxxxxxx
=> EMAIL_PASSWORD: xxxxx

heroku config:set EMAIL_PASSWORD="xxxxx$xxxxxxxx"
=> EMAIL_PASSWORD: xxxxx
Cottbus answered 14/3, 2014 at 23:20 Comment(0)
E
21

Assuming you are using Bash (which is likely if you are on Mac or Linux) you can use single quotes to escape strings with $, or use \:

$ echo $FOO

$ echo "$FOO"

$ echo '$FOO'
$FOO
$ echo \$FOO
$FOO
Empyrean answered 14/3, 2014 at 23:38 Comment(1)
Spent half day pulling out my hair on this... need to do the same for config vars beginning with '@'Bateman

© 2022 - 2024 — McMap. All rights reserved.