Skip to content

Commit 027bdc5

Browse files
committed
Minor bugfix
1 parent d2f747e commit 027bdc5

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

Sources/Commands/SwiftScriptTool.swift

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,6 @@ public struct SwiftScriptTool: ParsableCommand {
5050
],
5151
helpNames: [.short, .long, .customLong("help", withSingleDash: true)])
5252

53-
// @OptionGroup()
54-
// var swiftOptions: SwiftToolOptions
55-
//
56-
// @OptionGroup()
57-
// var options: ScriptToolOptions
58-
5953
public init() {}
6054

6155
public static var _errorLabel: String { "error" }
@@ -88,10 +82,11 @@ extension SwiftScriptTool {
8882
} else {
8983
swiftTool.redirectStdoutToStderr()
9084
}
85+
// FIXME: More elegant solution?
86+
print(diagnostic: .init(message: .note("Using cache: \(cacheDirPath.basename)")),
87+
stdoutStream: swiftTool.stdoutStream)
9188

9289
do {
93-
// FIXME: How to hide the note?
94-
swiftTool.diagnostics.emit(note: "Using cache: \(cacheDirPath.basename)")
9590
let buildSystem = try swiftTool.createBuildSystem(explicitProduct: nil)
9691
if options.shouldBuild {
9792
try buildSystem.build(subset: .product(productName))
@@ -122,9 +117,9 @@ extension SwiftScriptTool {
122117

123118
func run(_ swiftTool: SwiftTool, as productName: String, at cacheDirPath: AbsolutePath) throws {
124119
swiftTool.redirectStdoutToStderr()
120+
swiftTool.diagnostics.emit(note: "Using cache: \(cacheDirPath.basename)")
125121

126122
do {
127-
swiftTool.diagnostics.emit(note: "Using cache: \(cacheDirPath.basename)")
128123
let buildSystem = try swiftTool.createBuildSystem(explicitProduct: nil)
129124
if options.shouldBuild {
130125
try buildSystem.build(subset: .product(productName))

0 commit comments

Comments
 (0)