diff --git a/CHANGELOG.md b/CHANGELOG.md index b977b122..38700a23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/Sources/Runner/Commands/Runner.swift b/Sources/Runner/Commands/Runner.swift index 1366ffe3..ae7ec5ee 100644 --- a/Sources/Runner/Commands/Runner.swift +++ b/Sources/Runner/Commands/Runner.swift @@ -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