Skip to content

Commit 293ad6b

Browse files
committed
generator: Add an environment variable to choose the container runtime
1 parent 0c65e75 commit 293ad6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator+Copy.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ extension SwiftSDKGenerator {
1818
baseDockerImage: String,
1919
sdkDirPath: FilePath
2020
) async throws {
21-
logGenerationStep("Launching a Docker container to copy Swift SDK for the target triple from it...")
21+
logGenerationStep("Launching a container to extract the Swift SDK for the target triple...")
2222
try await withDockerContainer(fromImage: baseDockerImage) { containerID in
2323
try await inTemporaryDirectory { generator, _ in
2424
let sdkUsrPath = sdkDirPath.appending("usr")

Sources/SwiftSDKGenerator/Generator/SwiftSDKGenerator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public actor SwiftSDKGenerator {
6060
}
6161

6262
private let fileManager = FileManager.default
63-
private static let dockerCommand = "docker"
63+
private static let dockerCommand = ProcessInfo.processInfo.environment["SWIFT_SDK_GENERATOR_CONTAINER_RUNTIME"] ?? "docker"
6464

6565
public static func getCurrentTriple(isVerbose: Bool) throws -> Triple {
6666
let current = UnixName.current!

0 commit comments

Comments
 (0)