We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
symlink
1 parent 22a397b commit 1bba4b3Copy full SHA for 1bba4b3
Sources/Basic/PathShims.swift
@@ -45,8 +45,7 @@ public func makeDirectories(_ path: AbsolutePath) throws {
45
/// be a relative path, otherwise it will be absolute.
46
public func createSymlink(_ path: AbsolutePath, pointingAt dest: AbsolutePath, relative: Bool = true) throws {
47
let destString = relative ? dest.relative(to: path.parentDirectory).pathString : dest.pathString
48
- let rv = SPMLibc.symlink(destString, path.pathString)
49
- guard rv == 0 else { throw SystemError.symlink(errno, path.pathString, dest: destString) }
+ try FileManager.default.createSymbolicLink(atPath: path.pathString, withDestinationPath: destString)
50
}
51
52
/// The current working directory of the processs.
0 commit comments