Skip to content

Commit

Permalink
Merge pull request #640 from danger/fix_url_crash
Browse files Browse the repository at this point in the history
Fix current directory url creation
  • Loading branch information
f-meloni authored Jan 29, 2025
2 parents c61b04a + 047e0e0 commit 2ff024b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

## Master

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

## 3.21.0

- Add mise support [@msnazarow][] - [#633](https://github.com/danger/swift/pull/633)
Expand Down
4 changes: 2 additions & 2 deletions Sources/Runner/Commands/Runner.swift
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ func runDanger(version dangerSwiftVersion: String, logger: Logger) throws {
proc.arguments = args
let standardOutput = FileHandle.standardOutput
if let cwdOptionIndex = CommandLine.arguments.firstIndex(of: DangeSwiftRunnerOption.cwd.rawValue),
(cwdOptionIndex + 1) < CommandLine.arguments.count,
let directoryURL = URL(string: CommandLine.arguments[cwdOptionIndex + 1])
(cwdOptionIndex + 1) < CommandLine.arguments.count
{
let directoryURL = URL(fileURLWithPath: CommandLine.arguments[cwdOptionIndex + 1])
proc.currentDirectoryURL = directoryURL
}
proc.standardOutput = standardOutput
Expand Down

0 comments on commit 2ff024b

Please sign in to comment.