XITASO / devcmd

Development Commands in Node.js and TypeScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using yarn over npx results in much more verbose error logs

lieberlois opened this issue · comments

When using devcmd with invalid arguments with yarn, for example yarn devcmd, the error log looks something like this:

yarn run v1.22.10
$ cd dev_cmds && yarn devcmd
$ /home/luis/dev/devcmd/dev_cmds/node_modules/.bin/devcmd
devcmd v0.0.8
No script specified.
Command failed: node -e require('devcmd/from-cli').run(...process.argv.slice(1))
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

However, when using npx, the error log is much simpler and way easier to read, something like this:

devcmd v0.0.8
No script specified.

The amount of yarn error messages depends on the amount of yarn command nestings.
When running yarn devcmd in the root of the repository, the script cd dev_cmds && yarn devcmd is executed, which produces 2 error messages. However, executing (cd packages/devcmd && yarn devcmd) only produces one error message.