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

fix: log error if --config-name is used without multiple configs #1874

Merged
merged 1 commit into from
Oct 6, 2020

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
NA
Summary
log warning if --config-name is used without multiple configs

Does this PR introduce a breaking change?
No

Other information
No

@snitin315 snitin315 marked this pull request as ready for review October 5, 2020 14:33
@snitin315 snitin315 requested a review from a team as a code owner October 5, 2020 14:33
} else {
newOptionsObject['options'] = namedOptions;
logger.warn('Multiple configurations not found. Please use "--config-name" with multiple configurations.');
newOptionsObject['options'] = configOptions;
Copy link
Member

Choose a reason for hiding this comment

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

Why it is a warning?

Copy link
Member Author

Choose a reason for hiding this comment

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

So that build is not interrupted and stats are printed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Or we can throw error and exit process too.

Copy link
Member

Choose a reason for hiding this comment

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

I think it should be error and we should exit, because we can't found config

Copy link
Member

Choose a reason for hiding this comment

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

Yep not exiting will set wrong expectations

Copy link
Member Author

Choose a reason for hiding this comment

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

I will update 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

updated 👍🏻

@snitin315 snitin315 changed the title fix: log warning if --config-name is used without multiple configs fix: log error if --config-name is used without multiple configs Oct 6, 2020
@snitin315 snitin315 requested a review from a team October 6, 2020 09:45
Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

/cc @webpack/cli-team

@alexander-akait alexander-akait merged commit f653409 into next Oct 6, 2020
@alexander-akait alexander-akait deleted the fix/config-name branch October 6, 2020 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants