Commit 3e9e9a0
committed
Fix infinite searching for
Due to swiftlang/swift-foundation#980, the we may end up with a `path == ""` instead of `/`.
We didn’t catch this in the test because we only end up with an empty path when searching for a `.swift-format` file from a `.swift-file` that was not at the root of a directory..swift-format file on Linux1 parent 7ee11c7 commit 3e9e9a0
File tree
2 files changed
+12
-1
lines changed- Sources/SwiftFormat/API
- Tests/SwiftFormatTests/API
2 files changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
480 | 480 | | |
481 | 481 | | |
482 | 482 | | |
483 | | - | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
484 | 486 | | |
485 | 487 | | |
486 | 488 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
29 | 38 | | |
0 commit comments