Skip to content

Commit

Permalink
fix(core): static run one lifecycle should always print dependent tas…
Browse files Browse the repository at this point in the history
…k status, and output when verbose (#21720)
  • Loading branch information
JamesHenry committed Feb 9, 2024
1 parent 9683ebc commit 5911ca6
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class StaticRunOneTerminalOutputLifeCycle implements LifeCycle {
private readonly args: {
targets?: string[];
configuration?: string;
verbose?: boolean;
}
) {}

Expand Down Expand Up @@ -110,13 +111,20 @@ export class StaticRunOneTerminalOutputLifeCycle implements LifeCycle {
status: TaskStatus,
terminalOutput: string
) {
const args = getPrintableCommandArgsForTask(task);
if (
this.args.verbose ||
status === 'success' ||
status === 'failure' ||
task.target.project === this.initiatingProject
) {
const args = getPrintableCommandArgsForTask(task);
output.logCommandOutput(args.join(' '), status, terminalOutput);
} else {
/**
* Do not show the terminal output in the case where it is not the initiating project and verbose is not set,
* but still print the command that was run and its status (so that cache hits can still be traced).
*/
output.logCommandOutput(args.join(' '), status, '');
}
}
}

0 comments on commit 5911ca6

Please sign in to comment.