@@ -50,12 +50,6 @@ public struct SwiftScriptTool: ParsableCommand {
50
50
] ,
51
51
helpNames: [ . short, . long, . customLong( " help " , withSingleDash: true ) ] )
52
52
53
- // @OptionGroup()
54
- // var swiftOptions: SwiftToolOptions
55
- //
56
- // @OptionGroup()
57
- // var options: ScriptToolOptions
58
-
59
53
public init ( ) { }
60
54
61
55
public static var _errorLabel : String { " error " }
@@ -88,10 +82,11 @@ extension SwiftScriptTool {
88
82
} else {
89
83
swiftTool. redirectStdoutToStderr ( )
90
84
}
85
+ // FIXME: More elegant solution?
86
+ print ( diagnostic: . init( message: . note( " Using cache: \( cacheDirPath. basename) " ) ) ,
87
+ stdoutStream: swiftTool. stdoutStream)
91
88
92
89
do {
93
- // FIXME: How to hide the note?
94
- swiftTool. diagnostics. emit ( note: " Using cache: \( cacheDirPath. basename) " )
95
90
let buildSystem = try swiftTool. createBuildSystem ( explicitProduct: nil )
96
91
if options. shouldBuild {
97
92
try buildSystem. build ( subset: . product( productName) )
@@ -122,9 +117,9 @@ extension SwiftScriptTool {
122
117
123
118
func run( _ swiftTool: SwiftTool , as productName: String , at cacheDirPath: AbsolutePath ) throws {
124
119
swiftTool. redirectStdoutToStderr ( )
120
+ swiftTool. diagnostics. emit ( note: " Using cache: \( cacheDirPath. basename) " )
125
121
126
122
do {
127
- swiftTool. diagnostics. emit ( note: " Using cache: \( cacheDirPath. basename) " )
128
123
let buildSystem = try swiftTool. createBuildSystem ( explicitProduct: nil )
129
124
if options. shouldBuild {
130
125
try buildSystem. build ( subset: . product( productName) )
0 commit comments