Skip to content

Commit c8ea628

Browse files
authored
Suppress note messages (but not warnings or errors) in --quiet mode (#226)
1 parent f2f5564 commit c8ea628

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

Sources/SkipBuild/OutputOptions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct OutputOptions: ParsableArguments {
2424
@Flag(name: [.customShort("v"), .long], help: ArgumentHelp("Whether to display verbose messages"))
2525
var verbose: Bool = false
2626

27-
@Flag(name: [.customShort("q"), .long], help: ArgumentHelp("Quiet mode: suppress output"))
27+
@Flag(name: [.customShort("q"), .long], help: ArgumentHelp("Suppress informational (note) messages; warnings and errors are still shown"))
2828
var quiet: Bool = false
2929

3030
@Flag(name: [.customShort("J"), .long], help: ArgumentHelp("Emit output as formatted JSON"))

Sources/SkipBuild/SkipCommand.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ extension StreamingCommand {
688688

689689
/// Output the given message (info/trace to stdout, warnings/errors to stderr)
690690
func msg(_ kind: Message.Kind = .note, _ message: @autoclosure () throws -> String, sourceFile: Source.FilePath? = nil, sourceRange: Source.Range? = nil) rethrows {
691-
if outputOptions.quiet == true {
691+
if outputOptions.quiet == true && kind == .note {
692692
return
693693
}
694694
if kind == .trace && outputOptions.verbose != true {

0 commit comments

Comments
 (0)