Print 'fake' docker run command

See: https://www.pivotaltracker.com/story/show/175202648
This commit is contained in:
Kris De Volder
2020-10-19 09:46:04 -07:00
parent 2cc42fd085
commit 52755d6ba1
5 changed files with 159 additions and 4 deletions

View File

@@ -56,4 +56,23 @@ public interface AppConsole {
void show();
default void logCommand(String string) {
try {
String[] pieces = string.split("\\n");
for (int i = 0; i < pieces.length; i++) {
write((i==0?"$ ":"> ")+pieces[i], LogType.STDOUT);
}
} catch (Exception e) {
Log.log(e);
}
}
default void logCommandResult(String string) {
try {
write(string, LogType.STDOUT);
} catch (Exception e) {
Log.log(e);
}
}
}