Skip to content

Commit 2ff024b

Browse files
authored
Merge pull request #640 from danger/fix_url_crash
Fix current directory url creation
2 parents c61b04a + 047e0e0 commit 2ff024b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
## Master
1515

16+
- Fix current directory url creation [@f-meloni][] - [#640](https://github.com/danger/swift/pull/640)
17+
1618
## 3.21.0
1719

1820
- Add mise support [@msnazarow][] - [#633](https://github.com/danger/swift/pull/633)

Sources/Runner/Commands/Runner.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ func runDanger(version dangerSwiftVersion: String, logger: Logger) throws {
159159
proc.arguments = args
160160
let standardOutput = FileHandle.standardOutput
161161
if let cwdOptionIndex = CommandLine.arguments.firstIndex(of: DangeSwiftRunnerOption.cwd.rawValue),
162-
(cwdOptionIndex + 1) < CommandLine.arguments.count,
163-
let directoryURL = URL(string: CommandLine.arguments[cwdOptionIndex + 1])
162+
(cwdOptionIndex + 1) < CommandLine.arguments.count
164163
{
164+
let directoryURL = URL(fileURLWithPath: CommandLine.arguments[cwdOptionIndex + 1])
165165
proc.currentDirectoryURL = directoryURL
166166
}
167167
proc.standardOutput = standardOutput

0 commit comments

Comments
 (0)