File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Sources/Basics/Concurrency Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ import TSCLibc
18
18
import Android
19
19
#endif
20
20
21
- #if !os(Windows)
21
+ #if !os(Windows) && !canImport(Darwin)
22
22
#if USE_IMPL_ONLY_IMPORTS
23
23
@_implementationOnly
24
24
import func TSCclibc. SPM_posix_spawn_file_actions_addchdir_np_supported
@@ -29,7 +29,7 @@ import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np
29
29
private import func TSCclibc. SPM_posix_spawn_file_actions_addchdir_np_supported
30
30
private import func TSCclibc. SPM_posix_spawn_file_actions_addchdir_np
31
31
#endif // #if USE_IMPL_ONLY_IMPORTS
32
- #endif // #if os(Linux)
32
+ #endif
33
33
34
34
import class TSCBasic. CStringArray
35
35
import class TSCBasic. LocalFileOutputByteStream
@@ -621,11 +621,15 @@ package final class AsyncProcess {
621
621
defer { posix_spawn_file_actions_destroy ( & fileActions) }
622
622
623
623
if let workingDirectory = workingDirectory? . pathString {
624
+ #if canImport(Darwin)
625
+ posix_spawn_file_actions_addchdir_np ( & fileActions, workingDirectory)
626
+ #else
624
627
guard SPM_posix_spawn_file_actions_addchdir_np_supported ( ) else {
625
628
throw AsyncProcess . Error. workingDirectoryNotSupported
626
629
}
627
630
628
631
SPM_posix_spawn_file_actions_addchdir_np ( & fileActions, workingDirectory)
632
+ #endif
629
633
}
630
634
631
635
var stdinPipe : [ Int32 ] = [ - 1 , - 1 ]
You can’t perform that action at this time.
0 commit comments