Update "--subcommands" to also show the execution platform for each action.
@@ -293,18 +293,21 @@ public class ActionExecutionContext implements Closeable, ActionContext.ActionCo
return;
}
- String reason;
+ StringBuilder reason = new StringBuilder();
ActionOwner owner = spawn.getResourceOwner().getOwner();
if (owner == null) {
- reason = spawn.getResourceOwner().prettyPrint();
+ reason.append(spawn.getResourceOwner().prettyPrint());
} else {
- reason =
- Label.print(owner.getLabel())
- + " ["
- + spawn.getResourceOwner().prettyPrint()
- + ", configuration: "
- + owner.getConfigurationChecksum()
- + "]";
+ reason.append(Label.print(owner.getLabel()));
+ reason.append(" [");
+ reason.append(spawn.getResourceOwner().prettyPrint());
+ reason.append(", configuration: ");
+ reason.append(owner.getConfigurationChecksum());
+ if (owner.getExecutionPlatform() != null) {
+ reason.append(", execution platform: ");
+ reason.append(owner.getExecutionPlatform().label());
+ }
+ reason.append("]");
}
String message = Spawns.asShellCommand(spawn, getExecRoot(), showSubcommands.prettyPrintArgs);
getEventHandler().handle(Event.of(EventKind.SUBCOMMAND, null, "# " + reason + "\n" + message));
