File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 820820 NSWorkspaceOpenConfiguration *configuration = [[NSWorkspaceOpenConfiguration alloc ] init ];
821821 [configuration setArguments: arguments];
822822 [configuration setCreatesNewApplicationInstance: YES ];
823+ [configuration setEnvironment: [[NSProcessInfo processInfo ] environment ]];
823824 __block dispatch_semaphore_t lock = dispatch_semaphore_create (0 );
824825 __block Error err = ERR_TIMEOUT ;
825826 __block pid_t pid = 0 ;
849850 } else {
850851 Error err = ERR_TIMEOUT ;
851852 NSError *error = nullptr ;
852- NSRunningApplication *app = [[NSWorkspace sharedWorkspace ] launchApplicationAtURL: url options: NSWorkspaceLaunchNewInstance configuration: [NSDictionary dictionaryWithObject: arguments forKey: NSWorkspaceLaunchConfigurationArguments ] error: &error];
853+ NSDictionary *config = @{
854+ NSWorkspaceLaunchConfigurationArguments : arguments,
855+ NSWorkspaceLaunchConfigurationEnvironment : [[NSProcessInfo processInfo ] environment ]
856+ };
857+ NSRunningApplication *app = [[NSWorkspace sharedWorkspace ] launchApplicationAtURL: url options: NSWorkspaceLaunchNewInstance configuration: config error: &error];
853858 if (error) {
854859 err = ERR_CANT_FORK ;
855860 NSLog (@" Failed to execute: %@ " , error.localizedDescription);
You can’t perform that action at this time.
0 commit comments