diff --git a/ShadowsocksX-NG/ProxyConfHelper.m b/ShadowsocksX-NG/ProxyConfHelper.m index ba7f6f4..d81b947 100644 --- a/ShadowsocksX-NG/ProxyConfHelper.m +++ b/ShadowsocksX-NG/ProxyConfHelper.m @@ -51,12 +51,12 @@ GCDWebServer *webServer =nil; NSString *helperPath = [NSString stringWithFormat:@"%@/%@", [[NSBundle mainBundle] resourcePath], @"install_helper.sh"]; NSLog(@"run install script: %@", helperPath); NSDictionary *error; - NSString *script = [NSString stringWithFormat:@"do shell script \"bash %@\" with administrator privileges", helperPath]; + NSString *script = [NSString stringWithFormat:@"do shell script \"/bin/bash \\\"%@\\\"\" with administrator privileges", helperPath]; NSAppleScript *appleScript = [[NSAppleScript new] initWithSource:script]; if ([appleScript executeAndReturnError:&error]) { NSLog(@"installation success"); } else { - NSLog(@"installation failure"); + NSLog(@"installation failure: %@", error); } } }