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

firebase init remoteconfig will always overwrite existing template files #3137

Closed
inlined opened this issue Feb 15, 2021 · 2 comments · Fixed by #3139
Closed

firebase init remoteconfig will always overwrite existing template files #3137

inlined opened this issue Feb 15, 2021 · 2 comments · Fixed by #3139
Assignees

Comments

@inlined
Copy link
Member

inlined commented Feb 15, 2021

Found through code analysis. It looks like we overwrite an existing template file regardless of user choice.

@inlined inlined self-assigned this Feb 15, 2021
@inlined
Copy link
Member Author

inlined commented Feb 15, 2021

Verified:

$ echo '{"key": "value"}' > remoteconfig.template.json
$ firebase init remoteconfig

     ######## #### ########  ######## ########     ###     ######  ########
     ##        ##  ##     ## ##       ##     ##  ##   ##  ##       ##
     ######    ##  ########  ######   ########  #########  ######  ######
     ##        ##  ##    ##  ##       ##     ## ##     ##       ## ##
     ##       #### ##     ## ######## ########  ##     ##  ######  ########

You're about to initialize a Firebase project in this directory:

  /Users/inlined/git/junkdrawer

Before we get started, keep in mind:

  * You are initializing in an existing Firebase project directory


=== Project Setup

First, let's associate this project directory with a Firebase project.
You can create multiple project aliases by running firebase use --add,
but for now we'll just set up a default project.

i  .firebaserc already has a default project, using inlined-junkdrawer.

=== Remoteconfig Setup
? What file should be used for your Remote Config template? remoteconfig.template.json
? File remoteconfig.template.json already exists. Do you want to overwrite the existing Remote Config template? No

i  Writing configuration info to firebase.json...
i  Writing project information to .firebaserc...

✔  Firebase initialization complete!
$ cat remoteconfig.template.json
$ # nothing printed

@inlined
Copy link
Member Author

inlined commented Feb 15, 2021

Second error: the default is an empty file, which fails deployment.

@inlined inlined linked a pull request Feb 15, 2021 that will close this issue
This was referenced Mar 9, 2021
This was referenced Mar 12, 2021
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 a pull request may close this issue.

1 participant