chore(repo): make runCLI work in verbose mode (#13123)

This commit is contained in:
Jason Jean 2022-11-10 23:15:14 -05:00 committed by GitHub
parent 5f47917ce0
commit 16c3a2eb20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,15 +592,18 @@ export function runCLI(
): string {
try {
const pm = getPackageManagerCommand();
let r = stripConsoleColors(
execSync(`${pm.runNx} ${command}`, {
cwd: opts.cwd || tmpProjPath(),
env: { CI: 'true', ...(opts.env || process.env) },
encoding: 'utf-8',
stdio: isVerbose() ? 'inherit' : 'pipe',
maxBuffer: 50 * 1024 * 1024,
})
);
const logs = execSync(`${pm.runNx} ${command}`, {
cwd: opts.cwd || tmpProjPath(),
env: { CI: 'true', ...(opts.env || process.env) },
encoding: 'utf-8',
stdio: 'pipe',
maxBuffer: 50 * 1024 * 1024,
});
const r = stripConsoleColors(logs);
if (isVerbose()) {
console.log(logs);
}
const needsMaxWorkers = /g.*(express|nest|node|web|react):app.*/;
if (needsMaxWorkers.test(command)) {