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

Error message "error Command failed with exit code 1" is missing vital information -- what command failed? #8406

Open
atsalolikhin-spokeo opened this issue Oct 22, 2020 · 3 comments

Comments

@atsalolikhin-spokeo
Copy link

atsalolikhin-spokeo commented Oct 22, 2020

Bug description

I am helping to debug a CI build which is failing with the following output:

error Command failed with exit code 1
error Command failed with exit code 1

It prints the error message twice. We can't tell which command failed. The command is missing from the error message. It would be nice if the error message included the command so that we could see what's happening and fix it.

Command

yarn run webpack:verify

What is the current behavior?

Yarn prints the error message

error Command failed with exit code 1

What is the expected behavior?

It would be nice to have completed information, e.g. (made up example):

error Command "/bin/rm /tmp/nosuchfile" failed with exit code 1

Or, even better, show any stdout/stderr from the command:

error Command "/bin/rm /tmp/nosuchfile" failed with exit code 1: "rm: /tmp/nosuchfile: No such file or directory"

Steps to Reproduce

Environment

  • Node Version: v8.16.2
  • Yarn v1 Version: 1.19.2
  • OS and version: Amazon Linux 2
@atsalolikhin-spokeo atsalolikhin-spokeo changed the title Error message "error Command failed with exit code 1" is missing information -- what command failed? Error message "error Command failed with exit code 1" is missing vital information -- what command failed? Oct 22, 2020
@atsalolikhin-spokeo
Copy link
Author

atsalolikhin-spokeo commented Oct 22, 2020

I found this error message here:

expect(stderr).toEqual('error Command failed with exit code 1.');

I am not sure how it relates to the section where the error repot is made:

: reporter.lang('commandFailedWithCode', err.EXIT_CODE),

@theChengundertheQun
Copy link

我在这里发现了这个错误信息:

expect(stderr).toEqual('error Command failed with exit code 1.');

我不确定它与生成错误报告的部分有何关系:

: reporter.lang('commandFailedWithCode', err.EXIT_CODE),

Hi, I am in the same trouble just like you, have you resolve this problem?

@atsalolikhin-spokeo
Copy link
Author

We did, but I don't remember how... Sorry!

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

No branches or pull requests

2 participants