Skip to content

Commit

Permalink
fix(config-loader): do not set arguments if nil (#38)
Browse files Browse the repository at this point in the history
When setting the arguments for the task using an optional value, in
this case nil, it was raising a bad access exception from the Task.

To avoid this i added a validation to the arguments settings those only
when there is a non nil value.
  • Loading branch information
portellaa authored Feb 1, 2024
1 parent 2787e28 commit 9d040ab
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ internal extension ExecCredential {
func run(_ command: String, _ arguments: [String]?) throws -> Data {
let task = Process()
task.executableURL = URL(fileURLWithPath: command)
task.arguments = arguments
arguments.flatMap { task.arguments = $0 }

let pipe = Pipe()
task.standardOutput = pipe
Expand Down

0 comments on commit 9d040ab

Please sign in to comment.