Skip to content

Commit b8f2570

Browse files
authored
SwiftPMProduct.swift: fix use of deprecated initializer (#6641)
Fixes a warning produced during compilation of this file: ``` swiftpm/Sources/SPMTestSupport/SwiftPMProduct.swift:58:16: warning: no calls to throwing functions occur within 'try' expression return try! AbsolutePath(CommandLine.arguments.first!, relativeTo: localFileSystem.currentWorkingDirectory!) ```
1 parent 55006dc commit b8f2570

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SPMTestSupport/SwiftPMProduct.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ extension SwiftPM {
5555
}
5656
fatalError()
5757
#else
58-
return try! AbsolutePath(CommandLine.arguments.first!, relativeTo: localFileSystem.currentWorkingDirectory!)
58+
return try! AbsolutePath(validating: CommandLine.arguments.first!, relativeTo: localFileSystem.currentWorkingDirectory!)
5959
.parentDirectory.appending(self.executableName)
6060
#endif
6161
}

0 commit comments

Comments
 (0)