Skip to content

Conversation

@c-w
Copy link

@c-w c-w commented Dec 18, 2023

This pull request adds a flag --raw to skip shell escaping the values that are being output. The use-case I have for this flag is two-fold:

  1. The current escaping is quite aggressive and adds quotes in scenarios where they're not strictly necessary (e.g. export FOO=bar+baz works fine but currently gets escaped); adding this flag means more predictable output in scenarios where the user knows that the secrets won't contain any shell-specific special characters.

  2. More importantly adding this flag means that ejson2env can now be used on Github Actions to set environment variables (docs) via ejson2env --raw path/to/secrets.ejson >> "${GITHUB_ENV}". Before this PR, this approach wouldn't work as Github Actions doesn't interpret escape characters.

@c-w c-w requested a review from burke as a code owner December 18, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant