Skip to content

Commit 5444f46

Browse files
authored
Do not move symlink swiftly into the bin directory (#365)
1 parent 5508505 commit 5444f46

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/SwiftlyCore/Platform.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,11 @@ extension Platform {
377377
return
378378
}
379379

380+
// If swiftly is symlinked then we leave it where it is, such as in a homebrew installation.
381+
if let _ = try? FileManager.default.destinationOfSymbolicLink(atPath: cmdAbsolute) {
382+
return
383+
}
384+
380385
// Proceed to installation only if we're in the user home directory, or a non-system location.
381386
let userHome = fs.home
382387

0 commit comments

Comments
 (0)