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

cli ralways eturns exitcode 0 on errors #39

Closed
6 tasks
agreif opened this issue Dec 31, 2019 · 1 comment
Closed
6 tasks

cli ralways eturns exitcode 0 on errors #39

agreif opened this issue Dec 31, 2019 · 1 comment
Assignees

Comments

@agreif
Copy link

agreif commented Dec 31, 2019

  1. Describe your issue:

compiling .riot file on the commandline returns always 0, even on errors.
This happens in the following cases:

for a nonexistent file:

$ ~/node_modules/.bin/riot none-xistent-file.riot
(node:25239) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, stat 'none-xistent-file'
at statSync (fs.js:915:3)
...

$ echo $?
0

and also if the file exists but has no root node:

$ touch foo.riot
$ ~/node_modules/.bin/riot foo.riot 
(node:25366) UnhandledPromiseRejectionWarning: Error: [1,0]: Root tag not found.
...

$ echo $?
0

Wishful bugfix: in case of an error, a not-zeroexitcode should be returned in the shell, so that the calling process can recognize the error

  1. Can you reproduce the issue?

yes, install riot cli v 4.0.3 ad do the steps in 1)

  1. Which version of Riot does it affect?

    $ ~/node_modules/.bin/riot -v
    4.0.3

  2. How would you tag this issue?

  • Question
  • [ X] Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@GianlucaGuarini
Copy link
Member

GianlucaGuarini commented Jan 10, 2021

Feature added in @riotjs/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants