Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): static run one lifecycle should always print dependent task status, and output when verbose #21720

Merged
merged 4 commits into from
Feb 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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, '');
}
}
}