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
1818import  Android
1919#endif 
2020
21- #if !os(Windows) 
21+ #if !os(Windows) && !canImport(Darwin)  
2222#if USE_IMPL_ONLY_IMPORTS 
2323@_implementationOnly  
2424import  func  TSCclibc. SPM_posix_spawn_file_actions_addchdir_np_supported
@@ -29,7 +29,7 @@ import func TSCclibc.SPM_posix_spawn_file_actions_addchdir_np
2929private  import  func  TSCclibc. SPM_posix_spawn_file_actions_addchdir_np_supported
3030private  import  func  TSCclibc. SPM_posix_spawn_file_actions_addchdir_np
3131#endif // #if USE_IMPL_ONLY_IMPORTS 
32- #endif // #if os(Linux)  
32+ #endif 
3333
3434import  class  TSCBasic. CStringArray
3535import  class  TSCBasic. LocalFileOutputByteStream
@@ -621,11 +621,15 @@ package final class AsyncProcess {
621621        defer  {  posix_spawn_file_actions_destroy ( & fileActions)  } 
622622
623623        if  let  workingDirectory =  workingDirectory? . pathString { 
624+             #if canImport(Darwin) 
625+             posix_spawn_file_actions_addchdir_np ( & fileActions,  workingDirectory) 
626+             #else 
624627            guard  SPM_posix_spawn_file_actions_addchdir_np_supported ( )  else  { 
625628                throw  AsyncProcess . Error. workingDirectoryNotSupported
626629            } 
627630
628631            SPM_posix_spawn_file_actions_addchdir_np ( & fileActions,  workingDirectory) 
632+             #endif 
629633        } 
630634
631635        var  stdinPipe :  [ Int32 ]  =  [ - 1 ,  - 1 ] 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments