Skip to content

Commit 033761b

Browse files
committed
Adjust the macOS self-update routine to use the new installer path
1 parent debaf6f commit 033761b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Sources/MacOSPlatform/MacOS.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public struct MacOS: Platform {
9999
} else {
100100
homeDir = SwiftlyCore.mockedHomeDir ?? FileManager.default.homeDirectoryForCurrentUser
101101

102-
let installDir = homeDir.appendingPathComponent("usr/local")
102+
let installDir = homeDir.appendingPathComponent(".swiftly")
103103
try FileManager.default.createDirectory(atPath: installDir.path, withIntermediateDirectories: true)
104104

105105
// In the case of a mock for testing purposes we won't use the installer, perferring a manual process because
@@ -114,10 +114,11 @@ public struct MacOS: Platform {
114114
throw SwiftlyError(message: "Payload file could not be found at \(tmpDir).")
115115
}
116116

117-
try runProgram("tar", "-C", installDir.path, "-xf", payload.path)
117+
SwiftlyCore.print("Extracting the swiftly package into \(installDir.path)...")
118+
try runProgram("tar", "-C", installDir.path, "-xvf", payload.path, quiet: false)
118119
}
119120

120-
try self.runProgram(homeDir.appendingPathComponent("usr/local/bin/swiftly").path, "init")
121+
try self.runProgram(homeDir.appendingPathComponent(".swiftly/bin/swiftly").path, "init")
121122
}
122123

123124
public func uninstall(_ toolchain: ToolchainVersion, verbose: Bool) throws {

0 commit comments

Comments
 (0)