Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix use of deprecated AbsolutePath and RelativePath initializers #738

Merged
merged 1 commit into from
May 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/SKCore/XCToolchainPlist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ extension XCToolchainPlist {
init(fromDirectory path: AbsolutePath, _ fileSystem: FileSystem = localFileSystem) throws {
#if os(macOS)
let plistNames = [
RelativePath("ToolchainInfo.plist"), // Xcode
RelativePath("Info.plist"), // Swift.org
try RelativePath(validating: "ToolchainInfo.plist"), // Xcode
try RelativePath(validating: "Info.plist"), // Swift.org
]

var missingPlistPath: AbsolutePath?
Expand Down
2 changes: 1 addition & 1 deletion Sources/SKSupport/FileSystem.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extension AbsolutePath {
/// Inititializes an absolute path from a string, expanding a leading `~` to `homeDirectoryForCurrentUser` first.
public init(expandingTilde path: String) throws {
if path.first == "~" {
try self.init(homeDirectoryForCurrentUser, String(path.dropFirst(2)))
try self.init(homeDirectoryForCurrentUser, validating: String(path.dropFirst(2)))
} else {
try self.init(validating: path)
}
Expand Down