yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.37k stars 2.72k forks source link

Cancelling Yarn command generates an exit error #8937

Closed lexman1958 closed 1 year ago

lexman1958 commented 1 year ago

I am running yarn in the VS Code Terminal Window and the version shows 1.22.19. The command i run is "yarn dev" in vuejs. This works fine. When i cancel the command, with cntrl-c, it exists the dev server with the message "error Command failed with exit code 1".

Following the advise here, i tried "npm install -g yarn" with the intend to upgrade to yarn 2. The install seems to go thru but when i run the "yarn dev" it still show version 1.22.19 and error is still there.

Please advise.

Screenshot_2

Haroenv commented 1 year ago

That's normal. When you exit a program with control c, you're invoking an error (sigkill) in the program, so that means its last exit code is an error.