node-gyp icon indicating copy to clipboard operation
node-gyp copied to clipboard

--silent flag is not respected.

Open serkanyersen opened this issue 4 years ago • 0 comments

  • Node Version: v14.15.1 and 7.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

serkanyersen avatar Aug 27 '21 19:08 serkanyersen