Skip to content

Commit

Permalink
fix casting between UnsafeMutablePointer<CChar> and UnsafePointer<CCh…
Browse files Browse the repository at this point in the history
…ar>!
  • Loading branch information
miguelangel-dev committed Oct 31, 2021
1 parent b79828b commit 200b148
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Sources/CommandExecutor.swift
Expand Up @@ -110,7 +110,8 @@ class InteractiveTaskExecutor: TaskExecutor {
posix_spawn_file_actions_addclose(&childFDActions, outputPipe[1])

var pid: pid_t = 0
let result = posix_spawn(&pid, argv[0], &childFDActions, nil, argv + [nil], ActualTaskExecutor.environment)
let argvPointer: UnsafePointer<CChar>! = UnsafePointer(argv[0])
let result = posix_spawn(&pid, argvPointer, &childFDActions, nil, argv + [nil], ActualTaskExecutor.environment)

return (Int(result), "", "")
}
Expand Down

0 comments on commit 200b148

Please sign in to comment.