Skip to content

Commit 1345e48

Browse files
committed
SR-14796: Don't lose '-sdk /' when dropping the trailing slash
1 parent e9253c8 commit 1345e48

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/SwiftDriver/Driver/Driver.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,7 @@ extension Driver {
21002100
}
21012101

21022102
// Delete trailing /.
2103-
sdkPath = sdkPath.map { $0.last == "/" ? String($0.dropLast()) : $0 }
2103+
sdkPath = sdkPath.map { $0.length > 1 && $0.last == "/" ? String($0.dropLast()) : $0 }
21042104

21052105
// Validate the SDK if we found one.
21062106
if let sdkPath = sdkPath {

0 commit comments

Comments
 (0)