Skip to content

docs: clarify --silent flag doesn't suppress exit codes#249

Open
Jah-yee wants to merge 1 commit intoshelljs:mainfrom
Jah-yee:main
Open

docs: clarify --silent flag doesn't suppress exit codes#249
Jah-yee wants to merge 1 commit intoshelljs:mainfrom
Jah-yee:main

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented May 4, 2026

Description

Clarifies that the --silent flag only suppresses error output, not the exit code. Users in #208 expected --silent to also suppress exit codes, leading to confusion in npm scripts.

Changes

Added one line to the README Usage example:

$ shx --silent ls fakeFileName || shx true  # silence error output and ignore the exit status

This follows the exact suggestion from the maintainer in #208.

Related

Fixes #208

Fixes shelljs#208. The --silent flag only suppresses error output, not
the exit code. Add an example showing how to combine --silent
with '|| shx true' to also ignore the exit status.
@Jah-yee Jah-yee mentioned this pull request May 4, 2026
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

Successfully merging this pull request may close these issues.

--silent doesn't work

1 participant