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
fix: bail out of firebase init hosting:github
early with helpful message if Hosting isn't set up
#3114
fix: bail out of firebase init hosting:github
early with helpful message if Hosting isn't set up
#3114
Conversation
Thank you @devpeerapong for your help! I suggested a change to the language in the error message. Can you also please add a line in If you can do those two things we should be able to merge this |
firebase init hosting:github
early with helpful message if Hosting isn't set up
07e2f15
to
3dcae04
Compare
3dcae04
to
454fe00
Compare
both error message and |
src/init/features/hosting/github.ts
Outdated
@@ -54,6 +54,13 @@ export async function initGitHub(setup: Setup, config: any, options: any): Promi | |||
return reject("Could not determine Project ID, can't set up GitHub workflow.", { exit: 1 }); | |||
} | |||
|
|||
if (!setup.config.hosting) { | |||
return reject( | |||
`Didn't find a Hosting config in firebase.json. Run ${bold("firebase init hosting")} instead.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please run npm run format
in the codebase to clear up this error
src/init/features/hosting/github.ts
Outdated
if (!setup.config.hosting) { | ||
return reject( | ||
`Didn't find a Hosting config in firebase.json. Run ${bold("firebase init hosting")} instead.`, | ||
{ exit: 1 } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exit: 1
is the default and can be omitted.
454fe00
to
8fc563c
Compare
Description
#3113
Scenarios Tested
firebase init hosting:github
Sample Commands