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

[legacy-framework] Add helpful error messages to CLI when trying to use commands outside an app #319

Merged
merged 19 commits into from
May 5, 2020

Conversation

Zeko369
Copy link
Collaborator

@Zeko369 Zeko369 commented Apr 28, 2020

Type: feature

Another shot at #203 because of Oclif bug

Breaking change: No, but the same was sad last time 😄

@Zeko369 Zeko369 requested a review from aem as a code owner April 28, 2020 17:04
const whitelistGlobal = ['new']

const hook: Hook<'init'> = async function (options) {
// Bug with oclif
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you open an issue with their project? would be good to get this fixed at some point

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (err) {
switch (message) {
case IsBlitzRootError.notBlitz:
this.log(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we use the @blitzjs/server/utils/log utility rather than the Command logger?

@Zeko369 Zeko369 requested review from flybayer and ryardley as code owners May 5, 2020 09:01
@flybayer flybayer changed the title Add back checkIfRunningInsideBlitz Add helpful error messages to CLI when trying to use commands outside an app May 5, 2020
@flybayer flybayer merged commit f0517e0 into blitz-js:canary May 5, 2020
@flybayer
Copy link
Member

flybayer commented May 5, 2020

Thank you @Zeko369!!

@itsdillon itsdillon changed the title Add helpful error messages to CLI when trying to use commands outside an app [legacy-framework] Add helpful error messages to CLI when trying to use commands outside an app Jul 7, 2022
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 this pull request may close these issues.

3 participants