Add "Running ... " output to nomulus tool confirming commands

This makes it more clear than an operation is actually pending, rather
than nothing changing after pressing "Y" to run the command.

The prompt now looks like when you press "Y" and "N", respectively:

Perform this command? (y/N): Running ...

Perform this command? (y/N): Command aborted.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=193521084
This commit is contained in:
mcilwain 2018-04-19 08:42:17 -07:00 committed by jianglai
parent 7bf8c02264
commit f3359a5760

View file

@ -37,6 +37,7 @@ public abstract class ConfirmingCommand implements Command {
// nothing further. // nothing further.
return; return;
} else if (force || promptForYes("Perform this command?")) { } else if (force || promptForYes("Perform this command?")) {
System.out.println("Running ... ");
System.out.println(execute()); System.out.println(execute());
printLineIfNotEmpty(postExecute()); printLineIfNotEmpty(postExecute());
} else { } else {