Sanitizes a string by redacting URL credentials.
(value: string | null | undefined)
| 251 | // The `close` event is used because the process is guaranteed to have completed writing to |
| 252 | // stdout and stderr, using the `exit` event can cause inconsistent information in stdout and |
| 253 | // stderr due to a race condition around exiting. |
| 254 | childProcess.on('close', (exitCode, signal) => { |
| 255 | const exitDescription = exitCode !== null ? `exit code "${exitCode}"` : `signal "${signal}"`; |
| 256 | const status = statusFromExitCodeAndSignal(exitCode, signal); |
| 257 | const printFn = status !== 0 && options.mode === 'on-error' ? Log.error : Log.debug; |
| 258 | printFn(`Command "${sanitize(command)}" completed with ${exitDescription}.`); |
| 259 | if (!options.sensitiveOutput) { |
| 260 | printFn(`Process output: \n${sanitize(logOutput)}`); |
| 261 | } |
no outgoing calls
no test coverage detected