zodern / mup-node

Plugin for Meteor Up to deploy Node.js apps
13 stars 2 forks source link

Environment variables containing spaces don't work correctly #8

Closed lukeacl closed 3 months ago

lukeacl commented 3 years ago

When deploying a project that has an environment variable (under app.env) containing a space it fails.

If you try to escape using a backslash, or wrap it in single or double quotes it either fails or the escape character or quotes are visible inside the deployment. For example if you printed out process.env.MY_SPACED_VAR you'd see the backslash, or the quotes, they aren't removed.

To get around this issue I've declared any environment variables with spaces using app.docker.buildInstructions and declared it there, for example, "ENV MY_SPACED_VAR=Something\ With\ Spaces", and it works.