Skip to content

Commit 6a5d5d7

Browse files
committed
improving output to show time required to execute a command
1 parent 33a871c commit 6a5d5d7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Sources/Formic/Engine/CommandExecutionResult.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ extension CommandExecutionResult {
8282
stringOutput.append("exception: \(exception)")
8383
} else if output.returnCode != 0 {
8484
stringOutput.append("command: \(command), rc=\(output.returnCode), retries=\(retries)")
85-
stringOutput.append("[\(formattedDuration)] ")
85+
stringOutput.append(" δt=[\(formattedDuration)] ")
8686
if let errorOutput = output.stderrString {
8787
stringOutput.append("\nSTDERR: \(errorOutput)")
8888
} else {
8989
stringOutput.append(" No STDERR output.")
9090
}
9191
} else {
9292
stringOutput.append("command: \(command), rc=\(output.returnCode), retries=\(retries)")
93-
stringOutput.append("[\(formattedDuration)] ")
93+
stringOutput.append(" δt=[\(formattedDuration)] ")
9494
}
9595
case .verbose(emoji: let includeEmoji):
9696
// Reports host, command, duration, the result code, and stdout on success, or stderr on failure.
@@ -101,18 +101,18 @@ extension CommandExecutionResult {
101101
if includeEmoji {
102102
stringOutput.append(" ")
103103
}
104-
stringOutput.append("[\(formattedDuration)] ")
104+
stringOutput.append(" δt=[\(formattedDuration)] ")
105105
stringOutput.append("exception: \(exception)")
106106
} else if output.returnCode != 0 {
107-
stringOutput.append("[\(formattedDuration)] ")
107+
stringOutput.append(" δt=[\(formattedDuration)] ")
108108
stringOutput.append("command: \(command), rc=\(output.returnCode), retries=\(retries)")
109109
if let errorOutput = output.stderrString {
110110
stringOutput.append("\nSTDERR: \(errorOutput)")
111111
} else {
112112
stringOutput.append(" No STDERR output.")
113113
}
114114
} else {
115-
stringOutput.append("[\(formattedDuration)] ")
115+
stringOutput.append(" δt=[\(formattedDuration)] ")
116116
stringOutput.append("command: \(command), rc=\(output.returnCode), retries=\(retries)")
117117
if let stdoutOutput = output.stdoutString {
118118
stringOutput.append("\nSTDOUT: \(stdoutOutput)")
@@ -129,10 +129,10 @@ extension CommandExecutionResult {
129129
if includeEmoji {
130130
stringOutput.append(" ")
131131
}
132-
stringOutput.append("[\(formattedDuration)] ")
132+
stringOutput.append(" δt=[\(formattedDuration)] ")
133133
stringOutput.append("exception: \(exception)")
134134
} else {
135-
stringOutput.append("[\(formattedDuration)] ")
135+
stringOutput.append(" δt=[\(formattedDuration)] ")
136136
stringOutput.append("command: \(command), rc=\(output.returnCode), retries=\(retries)")
137137
if let errorOutput = output.stderrString {
138138
stringOutput.append("\nSTDERR: \(errorOutput)")

0 commit comments

Comments
 (0)