Skip to content

Commit

Permalink
fix(misc): create-nx-workspace should show some stdout if stderr empt…
Browse files Browse the repository at this point in the history
…y on error
  • Loading branch information
AgentEnder committed Mar 31, 2023
1 parent 0833f02 commit f6761e4
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ export function execAndWait(command: string, cwd: string) {
if (error) {
const logFile = join(cwd, 'error.log');
writeFileSync(logFile, `${stdout}\n${stderr}`);
rej(new CreateNxWorkspaceError(stderr, error.code, logFile));
const message = stderr && stderr.trim().length ? stderr : stdout;
rej(new CreateNxWorkspaceError(message, error.code, logFile));
} else {
res({ code: 0, stdout });
}
Expand Down

0 comments on commit f6761e4

Please sign in to comment.