Skip to content

3.21.0 throws NSInvalidArgumentException for currentDirectoryURL #639

@msunjo

Description

@msunjo

Hello, I was using danger-swift where I needed to change current working directory to parent directory. The command looks like this: danger-swift local --dangerfile <danger-file-path> --cwd ../ and it worked on version 3.20.0, but now it throws an exception. How should the path be passed now?

Error print:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSConcreteTask setCurrentDirectoryURL:]: non-file URL argument'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007ff816972b8e __exceptionPreprocess + 242
	1   libobjc.A.dylib                     0x00007ff816458f12 objc_exception_throw + 62
	2   Foundation                          0x00007ff8181c4bfa -[NSTask currentDirectoryURL] + 0
	3   danger-swift                        0x0000000102ede93c $s6Runner9runDanger7version6loggerySS_6LoggerAEVtKF + 13772
	4   danger-swift                        0x0000000102ee230a $s6Runner10runCommand33_DF2CC3DD2A89F7C463377197A13465C6LL_6loggery0A3Lib06DangerC0O_6LoggerAHVtKF + 266
	5   danger-swift                        0x0000000102ee1e02 Runner_main + 2242
	6   dyld                                0x000000020331e2cd start + 1805
)

libc++abi: terminating due to uncaught exception of type NSException

Error:  Error: Got no results back from the Dangerfile evaluation, this is likely an issue with a custom sub-process exiting early.
    at Executor.<anonymous> (/snapshot/danger-js/distribution/runner/Executor.js:152:35)
    at step (/snapshot/danger-js/distribution/runner/Executor.js:33:23)
    at Object.next (/snapshot/danger-js/distribution/runner/Executor.js:14:53)
    at /snapshot/danger-js/distribution/runner/Executor.js:8:71
    at new Promise (<anonymous>)
    at /snapshot/danger-js/distribution/runner/Executor.js:4:12
    at Executor.handleResults (/snapshot/danger-js/distribution/runner/Executor.js:146:16)
    at /snapshot/danger-js/distribution/commands/utils/runDangerSubprocess.js:174:47
    at step (/snapshot/danger-js/distribution/commands/utils/runDangerSubprocess.js:44:23)
    at Object.next (/snapshot/danger-js/distribution/commands/utils/runDangerSubprocess.js:25:53)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions