--silent flag is not respected.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 10.7k
- Forks
- 1.9k
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 5
Description
- Node Version:
v14.15.1and7.5.4 - Platform: Darwin seko-mbp 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64
- Compiler: Apple clang version 12.0.0 (clang-1200.0.32.21)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Applications/Xcode_12.1.0.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin - Module: general use via node api.
When used via node api, --silent flag is not respected. Code here https://github.com/nodejs/node-gyp/blob/master/lib/node-gyp.js#L170-L172
if (!opts.silent && !opts.stdio) {
opts.stdio = [0, 1, 2]
}
is setting the stdio to inherit but this does not make it silent if the parent script is not silent.
in this situation, setting this to ['ignore', 'ignore', 'ignore'] might be better, which will make it truly silent. In it's current state output is reduced but it's still printing out unexpected lines in the terminal.
More information can be found here https://github.com/electron/electron-rebuild/issues/594
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/node-gyp.js at the stdio handling around lines 170-172, using the Node API path described in the issue. Reproduce a silent invocation and verify that the completed behavior suppresses the unexpected terminal output while preserving the stated non-silent behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100