fix(secrets-masking): used the proper named import from hook-std to enable masking for stderr (#2619)
This commit is contained in:
parent
0ab8d9a4bc
commit
cf6befa2e8
@ -37,7 +37,6 @@ execa('git', ['--version'])
|
|||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Node 10+ from this point on
|
|
||||||
cli()
|
cli()
|
||||||
.then((exitCode) => {
|
.then((exitCode) => {
|
||||||
process.exitCode = exitCode;
|
process.exitCode = exitCode;
|
||||||
|
4
index.js
4
index.js
@ -2,7 +2,7 @@ import {createRequire} from 'node:module';
|
|||||||
import {pick} from 'lodash-es';
|
import {pick} from 'lodash-es';
|
||||||
import * as marked from 'marked';
|
import * as marked from 'marked';
|
||||||
import envCi from 'env-ci';
|
import envCi from 'env-ci';
|
||||||
import {hookStdout} from 'hook-std';
|
import {hookStd} from 'hook-std';
|
||||||
import semver from 'semver';
|
import semver from 'semver';
|
||||||
import AggregateError from 'aggregate-error';
|
import AggregateError from 'aggregate-error';
|
||||||
import hideSensitive from './lib/hide-sensitive.js';
|
import hideSensitive from './lib/hide-sensitive.js';
|
||||||
@ -251,7 +251,7 @@ async function callFail(context, plugins, err) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default async (cliOptions = {}, {cwd = process.cwd(), env = process.env, stdout, stderr} = {}) => {
|
export default async (cliOptions = {}, {cwd = process.cwd(), env = process.env, stdout, stderr} = {}) => {
|
||||||
const {unhook} = hookStdout(
|
const {unhook} = hookStd(
|
||||||
{silent: false, streams: [process.stdout, process.stderr, stdout, stderr].filter(Boolean)},
|
{silent: false, streams: [process.stdout, process.stderr, stdout, stderr].filter(Boolean)},
|
||||||
hideSensitive(env)
|
hideSensitive(env)
|
||||||
);
|
);
|
||||||
|
@ -23,7 +23,7 @@ import {extractErrors} from '../utils.js';
|
|||||||
* @param {Function} [options.getNextInput=identity] Function called after each step is executed, with the last step input and the current current step result; the returned value will be used as the input of the next step.
|
* @param {Function} [options.getNextInput=identity] Function called after each step is executed, with the last step input and the current current step result; the returned value will be used as the input of the next step.
|
||||||
* @param {Function} [options.transform=identity] Function called after each step is executed, with the current step result, the step function and the last step input; the returned value will be saved in the pipeline results.
|
* @param {Function} [options.transform=identity] Function called after each step is executed, with the current step result, the step function and the last step input; the returned value will be saved in the pipeline results.
|
||||||
*
|
*
|
||||||
* @return {Pipeline} A Function that execute the `steps` sequencially
|
* @return {Pipeline} A Function that execute the `steps` sequentially
|
||||||
*/
|
*/
|
||||||
export default (steps, {settleAll = false, getNextInput = identity, transform = identity} = {}) => async (input) => {
|
export default (steps, {settleAll = false, getNextInput = identity, transform = identity} = {}) => async (input) => {
|
||||||
const results = [];
|
const results = [];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user