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

[VTI] VTI should return exit code 1 and display more useful errors on unknown errors #2324

Closed
3 tasks done
andrewisaburden opened this issue Sep 24, 2020 · 2 comments · Fixed by #2330
Closed
3 tasks done
Labels

Comments

@andrewisaburden
Copy link
Contributor

andrewisaburden commented Sep 24, 2020

  • I have searched through existing issues
  • I have read through docs
  • I have read FAQ

Problem

If VTI hits an error not already accounted for with the existing exception handlers, it just prints VTI operation failed with no further information. It also exits with error code 0.

Proposed solution

 console.log(`VTI operation failed with error: ${_err}`);
 process.exit(1);

Potential Problem

I'm less sure about this one, but also if there are no files it exits with error code 0 (success). I think ESLint does the same, but arguably it should be treated as a failure so that if, say, a CI pipeline tried to run VTI on the wrong directory with no found Vue files it should return a failure so that the mistake can be picked up.

I'm happy to fix these if the solutions are OK.

@yoyo930021 yoyo930021 added the vti label Sep 25, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Sep 25, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Sep 25, 2020
@yoyo930021 yoyo930021 mentioned this issue Sep 25, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Sep 25, 2020
@andrewisaburden
Copy link
Contributor Author

@yoyo930021 do you have an opinion on exiting with error code 1 (failure) when no files are found?

@yoyo930021
Copy link
Member

@yoyo930021 do you have an opinion on exiting with error code 1 (failure) when no files are found?

No, I commit it when I rebase branch.

yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Oct 7, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Oct 7, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Oct 7, 2020
yoyo930021 added a commit to yoyo930021/vuter that referenced this issue Oct 7, 2020
octref added a commit that referenced this issue Oct 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants