Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--output env outputs double quoted values #696

Open
1 task done
andr-ec opened this issue Apr 4, 2024 · 2 comments
Open
1 task done

--output env outputs double quoted values #696

andr-ec opened this issue Apr 4, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@andr-ec
Copy link

andr-ec commented Apr 4, 2024

Steps To Reproduce

  1. 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

  • 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.
@andr-ec andr-ec added the bug Something isn't working label Apr 4, 2024
@tangowithfoxtrot
Copy link
Contributor

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.

@andr-ec
Copy link
Author

andr-ec commented Apr 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants