Skip to content

Commit bf78e82

Browse files
author
John Doe
committed
refactor: wip
1 parent 5bab88e commit bf78e82

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

packages/nx-plugin/src/executors/cli/executor.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { type ExecutorContext, logger } from '@nx/devkit';
1+
import { type ExecutorContext } from '@nx/devkit';
22
import { executeProcess } from '../../internal/execute-process.js';
33
import {
44
createCliCommandObject,
@@ -18,6 +18,7 @@ export default async function runAutorunExecutor(
1818
terminalAndExecutorOptions: AutorunCommandExecutorOptions,
1919
context: ExecutorContext,
2020
): Promise<ExecutorOutput> {
21+
const { logger, stringifyError } = await import('@code-pushup/utils');
2122
const normalizedContext = normalizeContext(context);
2223
const cliArgumentObject = parseAutorunExecutorOptions(
2324
terminalAndExecutorOptions,
@@ -41,12 +42,10 @@ export default async function runAutorunExecutor(
4142
await executeProcess({
4243
...createCliCommandObject({ command, args, bin }),
4344
...(context.cwd ? { cwd: context.cwd } : {}),
44-
...(Object.keys(executorEnvVariables).length > 0
45-
? { env: executorEnvVariables }
46-
: {}),
45+
...(verbose ? { env: executorEnvVariables } : {}),
4746
});
4847
} catch (error) {
49-
logger.error(error);
48+
logger.error(stringifyError(error));
5049
return {
5150
success: false,
5251
command: commandString,

0 commit comments

Comments
 (0)