Skip to content

Commit 67e8fa1

Browse files
committed
Fix build warnings
1 parent 985e34f commit 67e8fa1

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Package.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ let package = Package(
138138
.target(name: "MacOSPlatform", condition: .when(platforms: [.macOS])),
139139
.product(name: "ArgumentParser", package: "swift-argument-parser"),
140140
],
141-
path: "Tools/build-swiftly-release"
141+
path: "Tools/build-swiftly-release",
142+
exclude: ["musl-clang"],
142143
),
143144
.target(
144145
name: "LinuxPlatform",

Sources/TestSwiftly/TestSwiftly.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ struct TestSwiftly: AsyncParsableCommand {
9292
Foundation.exit(2)
9393
}
9494

95-
guard case let swiftlyArchive = FilePath(swiftlyArchive) else { fatalError("") }
95+
let swiftlyArchiveFile = FilePath(swiftlyArchive)
9696

9797
print("Extracting swiftly release")
9898
#if os(Linux)
99-
try await sys.tar().extract(.verbose, .compressed, .archive(swiftlyArchive)).run(currentPlatform, quiet: false)
99+
try await sys.tar().extract(.verbose, .compressed, .archive(swiftlyArchiveFile)).run(currentPlatform, quiet: false)
100100
#elseif os(macOS)
101-
try await sys.installer(.verbose, .pkg(swiftlyArchive), .target("CurrentUserHomeDirectory")).run(currentPlatform, quiet: false)
101+
try await sys.installer(.verbose, .pkg(swiftlyArchiveFile), .target("CurrentUserHomeDirectory")).run(currentPlatform, quiet: false)
102102
#endif
103103

104104
#if os(Linux)

Tools/generate-command-models/GenerateCommandModels.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,12 @@ struct GenerateCommandModels: AsyncParsableCommand {
278278

279279
let configFunc: String
280280
if path.count == 0 {
281+
let genArgs = options.asArgs + vars.asArgs
281282
configFunc = """
282283
public func config() -> Configuration {
283-
var genArgs: [String] = []
284+
\(genArgs.isEmpty ? "let" : "var") genArgs: [String] = []
284285
285-
\((options.asArgs + vars.asArgs).joined(separator: "\n" + indent(1)))
286+
\((genArgs).joined(separator: "\n" + indent(1)))
286287
287288
return Configuration(
288289
executable: self.executable,

0 commit comments

Comments
 (0)