Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Sources/SwiftlyCore/Platform.swift
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ extension Platform {
return
}

// If swiftly is symlinked then we leave it where it is, such as in a homebrew installation.
if let _ = try? FileManager.default.destinationOfSymbolicLink(atPath: cmdAbsolute) {
return
}

// Proceed to installation only if we're in the user home directory, or a non-system location.
let userHome = fs.home

Expand Down