Skip to content

Handling environment variables that include = #571

@stephenyeargin

Description

@stephenyeargin

I have an environment variable (in this case, an API key) that is something like abcdeadbeef= (with the trailing =). I store my variables as server configuration inputs in Rightscale (a cloud management provider) and they get passed on as plaintext to Foreman to generate a supervisord configuration file.

In summary:

  • Environment variable containing an equals
  • Foreman 0.78.0
  • Generating a Supervisor configuration file

I've tried a few different ways to store it in Rightscale and it keeps being double-encoded. An example:

Provided configuration Foreman generates ...
export API_KEY=abcdeadbeef= export API_KEY="abcdeadbeef\="
export API_KEY="abcdeadbeef=" export API_KEY="abcdeadbeef\="
export API_KEY="abcdeadbeef\=" export API_KEY="abcdeadbeef\\\="

I need Foreman to save it as export API_KEY="abcdeadbeef=". Any tips? It appears to be related to shell_quote, but it may be getting munged before then.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions