--output env outputs double quoted values
Steps To Reproduce
- bws secret list --output env
Expected Result
SECRET=value
Actual Result
SECRET="value"
Screenshots or Videos
No response
Additional Context
I believe it should be value by default, if the env requires the quotes such as "value" it should be saved with the double quotes originally.
Operating System
Linux
Operating System Version
No response
Shell
Zsh
Build Version
bws 0.4.0
Issue Tracking Info
- [X] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
Hey, @andr-ec.
Do you have an example of an instance where double-quoting the values is problematic?
We use double-quotes to reduce the potential for issues in cases where you might have a space, newline, or other special character that could behave undesirably when being parsed.
Yes I actually had this issue yesterday. I self hosted this project: https://github.com/twentyhq/twenty using docker containers. and then i pulled down down the secrets with bws secret list --output env and piped it into an env file.
you can see in the .env.example https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/.env.example
this var in specific:
AUTH_GOOGLE_CLIENT_ID=replace_me_with_google_client_id
if it includes double quotes, then the double quotes are parsed as well. so in this example the client id fails with google because the double quotes are being included in the oath URL that's being created.
so this is being sent in the url "replace_me_with_google_client_id" as opposed to this: replace_me_with_google_client_id