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

Issue with Firebase Config set on Object<Strings> #378

Closed
uppalapati41 opened this issue Jun 26, 2017 · 9 comments
Closed

Issue with Firebase Config set on Object<Strings> #378

uppalapati41 opened this issue Jun 26, 2017 · 9 comments

Comments

@uppalapati41
Copy link

When we try to set config with Object firebase functions:config:set foo.bar='{"test":"12","next":45}'

This is how we get value when we try to read it
firebase functions:config:get foo.bar :: "'{test:12,next:45}'"

Have seen in issues that this has been fixed but we still do get this error.

@laurenzlong
Copy link
Contributor

What CLI version, and what platform are you using?

@laurenzlong laurenzlong self-assigned this Jun 26, 2017
@uppalapati41
Copy link
Author

uppalapati41 commented Jun 27, 2017

firebase CLI 3.9.1 (node v6.10.3) on windows.

@laurenzlong
Copy link
Contributor

Can you try:
firebase functions:config:set foo.bar="{\"test\":\"12\",\"next\":45}"
or

firebase functions:config:set foo.bar.test=12
firebase functions:config:set foo.bar.next=45

I believe Windows requires double quotes to interpret something as a JSON, otherwise it will interpret it as a string. Can you let me know if the above commands work?

@uppalapati41
Copy link
Author

uppalapati41 commented Jun 27, 2017 via email

@laurenzlong
Copy link
Contributor

Thanks for letting me know, will investigate.

@bkendall
Copy link
Contributor

bkendall commented Jan 9, 2019

(This doesn't look like it was resolved, but may still be an issue when setting values as JSON strings. Should be investigated. Help is welcome from the community 😄)

@bkendall bkendall assigned kevinajian and unassigned laurenzlong Jan 9, 2019
@bkendall
Copy link
Contributor

bkendall commented Jan 9, 2019

it looks like it may be related to #371 as well

@joehan
Copy link
Contributor

joehan commented Jun 23, 2021

@taeold One more to check for the 'env:*' commands

@joehan joehan assigned taeold and unassigned kevinajian Jun 23, 2021
@taeold
Copy link
Contributor

taeold commented Jun 25, 2021

I'd surround things with ANSI-C Quote:

$ firebase functions:config:set foo.bar.car=$'"{"test":"12","next":45}"'
✔  Functions config updated.

$ firebase functions:config:get foo.bar.car 
"\"{\"test\":\"12\",\"next\":45}\""

This is a dup of #371.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants