Fixed missing newlines in CLI output

This commit is contained in:
Nick Lockwood
2019-06-23 12:26:49 +01:00
parent c4391554b4
commit 32ba97ddb8
2 changed files with 4 additions and 1 deletions
+2
View File
@@ -69,6 +69,8 @@ CLI.print = { message, type in
case .warning:
print(stderrIsTTY ? message.inYellow : message, to: &stderr)
case .content:
print(message)
case .raw:
print(message, terminator: "")
}
}
+2 -1
View File
@@ -40,6 +40,7 @@ public struct CLI {
case error
case warning
case content
case raw
}
/// Output handler - override this to intercept output from the CLI
@@ -506,7 +507,7 @@ func processArguments(_ args: [String], in directory: String) -> ExitCode {
} else {
// Write to stdout
let output = try format(input, options: options, verbose: false)
print(output, as: .content)
print(output, as: .raw)
}
} catch {
fatalError = error