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: handle SIGINT with prompt #2887

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

fix: handle SIGINT with prompt #2887

wants to merge 4 commits into from

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
fix

Did you add tests for your changes?
WIP
If relevant, did you update the documentation?
NO
Summary

Screenshot 2021-08-11 at 6 49 10 AM

Does this PR introduce a breaking change?
No

Other information
NO

@codecov
Copy link

codecov bot commented Aug 11, 2021

Codecov Report

Merging #2887 (032291e) into master (77668d7) will decrease coverage by 0.02%.
The diff coverage is 90.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2887      +/-   ##
==========================================
- Coverage   94.96%   94.93%   -0.03%     
==========================================
  Files          31       31              
  Lines        1708     1718      +10     
  Branches      486      486              
==========================================
+ Hits         1622     1631       +9     
- Misses         86       87       +1     
Impacted Files Coverage Δ
packages/webpack-cli/lib/utils/prompt.js 95.23% <90.00%> (-4.77%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 77668d7...032291e. Read the comment docs.

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.

Let's add test for this, looks good

Copy link
Member

@rishabh3112 rishabh3112 left a comment

Choose a reason for hiding this comment

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

Looks good. For testing it, you may add a case in serve's smoketest only.

@snitin315
Copy link
Member Author

I am not sure how to mock CTRL + C for tests here.

@alexander-akait
Copy link
Member

Just run process using execa and send SIGINT signal, no need to test CTRL + C, because it can be changed by user

});

// TODO: fix for windows
if (isWindows) {
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 is not good to skip windows test here...

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 see if I can test it on a windows machine locally.

@alexander-akait
Copy link
Member

@snitin315 let's rebase, I think it is finished and please don't ignore windows tests, I will fix it if it will have problems

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

Could you rebase?

Copy link
Member

@evenstensberg evenstensberg left a comment

Choose a reason for hiding this comment

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

rebase please

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.

5 participants