From 200b1486ed60d92b909c1ba8ded675bbb60e2805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20A=CC=81ngel?= Date: Sun, 31 Oct 2021 18:46:23 +0100 Subject: [PATCH] fix casting between UnsafeMutablePointer and UnsafePointer! --- Sources/CommandExecutor.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/CommandExecutor.swift b/Sources/CommandExecutor.swift index c8fb6e2..1d9af42 100644 --- a/Sources/CommandExecutor.swift +++ b/Sources/CommandExecutor.swift @@ -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! = UnsafePointer(argv[0]) + let result = posix_spawn(&pid, argvPointer, &childFDActions, nil, argv + [nil], ActualTaskExecutor.environment) return (Int(result), "", "") }