Skip to content

Commit 236bd85

Browse files
committed
Change --loglevel to error again
1 parent 15b9e99 commit 236bd85

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/shadow/npm/bin.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export default async function shadowBin(
2828
).filter(a => !isProgressFlag(a))
2929
const otherArgs = terminatorPos === -1 ? [] : args.slice(terminatorPos)
3030
const isSilent = !useDebug && !binArgs.some(isLoglevelFlag)
31-
const logLevelArgs = isSilent ? ['--loglevel', 'silent'] : []
31+
// The default value of loglevel is "notice". We default to "error" which is
32+
// two levels quieter.
33+
const logLevelArgs = isSilent ? ['--loglevel', 'error'] : []
3234
const spawnPromise = spawn(
3335
// Lazily access constants.execPath.
3436
constants.execPath,
@@ -50,9 +52,9 @@ export default async function shadowBin(
5052
constants.distShadowNpmInjectPath,
5153
// Lazily access constants.shadowBinPath.
5254
await installLinks(constants.shadowBinPath, binName),
53-
// Add `--no-progress` to fix input being swallowed by the npm spinner.
55+
// Add '--no-progress' to fix input being swallowed by the npm spinner.
5456
'--no-progress',
55-
// Add '--loglevel=silent' if a loglevel flag is not provided and the
57+
// Add '--loglevel=error' if a loglevel flag is not provided and the
5658
// SOCKET_CLI_DEBUG environment variable is not truthy.
5759
...logLevelArgs,
5860
...binArgs,

src/utils/npm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function safeNpmInstall(options?: SafeNpmInstallOptions) {
6767
// Avoid code paths for 'audit' and 'fund'.
6868
'--no-audit',
6969
'--no-fund',
70-
// Add `--no-progress` to fix input being swallowed by the npm spinner.
70+
// Add '--no-progress' to fix input being swallowed by the npm spinner.
7171
'--no-progress',
7272
// Add '--loglevel=silent' if a loglevel flag is not provided and the
7373
// SOCKET_CLI_DEBUG environment variable is not truthy.

0 commit comments

Comments
 (0)