UX tweaks
- Commit
0e399761c71f30f663f66b02aaab7dc2d7840991- Author
- Kabir Oberai <[email protected]>
- When
- 2025-04-25 21:49 UTC (1 year ago)
- Parents
3aaa8bb
Diff
Sources/SupersignCLISupport/DevCommands/DevSDKCommand.swift
diff --git a/Sources/SupersignCLISupport/DevCommands/DevSDKCommand.swift b/Sources/SupersignCLISupport/DevCommands/DevSDKCommand.swiftindex 887a860..3d621a3 100644--- a/Sources/SupersignCLISupport/DevCommands/DevSDKCommand.swift+++ b/Sources/SupersignCLISupport/DevCommands/DevSDKCommand.swift@@ -218,6 +218,10 @@ struct InstallSDKOperation { let sdkPath = try await builder.buildSDK() try DarwinSDK.install(from: sdkPath)++ // don't destroy tempDir before this point+ withExtendedLifetime(tempDir) {}+ print("Installed darwin.artifactbundle") #endif }
Sources/SupersignCLISupport/DevCommands/SDKBuilder.swift
diff --git a/Sources/SupersignCLISupport/DevCommands/SDKBuilder.swift b/Sources/SupersignCLISupport/DevCommands/SDKBuilder.swiftindex 99344e2..327f725 100644--- a/Sources/SupersignCLISupport/DevCommands/SDKBuilder.swift+++ b/Sources/SupersignCLISupport/DevCommands/SDKBuilder.swift@@ -38,8 +38,6 @@ struct SDKBuilder { // TODO: store relevant info for staleness check let sdkVersion = "develop" - print("[Cleaning stage]")- let output = URL(fileURLWithPath: outputPath, isDirectory: true) .appendingPathComponent("darwin.artifactbundle") @@ -82,7 +80,7 @@ struct SDKBuilder { written += Int64(chunk.count) if let length { let progress = Int(Double(written) / Double(length) * 100)- print("\r[Installing toolchain] \(progress)%", terminator: "")+ print("\r[Downloading toolchain] \(progress)%", terminator: "") fflush(stdoutSafe) } }@@ -100,7 +98,13 @@ struct SDKBuilder { case .xip(let inputPath): let devStage = output.appendingPathComponent("DeveloperStage") try FileManager.default.createDirectory(at: devStage, withIntermediateDirectories: false)- wanted = try await extractXIP(inputPath: inputPath, outDir: devStage.path)+ // unxip doesn't like cooperative cancellation atm so shield it.+ // if the user does a ^C during unxip, we'll just wait until extraction+ // is over before bailing+ wanted = try await Task {+ try await extractXIP(inputPath: inputPath, outDir: devStage.path)+ }.value+ try Task.checkCancellation() appDir = devStage.appendingPathComponent("Xcode.app") cleanupStageDir = devStage case .app(let appPath):@@ -155,7 +159,7 @@ struct SDKBuilder { } print() - print("[Cleaning XIP]")+ print("[Cleaning up]") if let cleanupStageDir { try? FileManager.default.removeItem(at: cleanupStageDir) }