aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleHTMLOutputController.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2012-05-07 11:07:44 +0000
committerstuconnolly <stuart02@gmail.com>2012-05-07 11:07:44 +0000
commit38eae1b30dc9eb65138741079737cb3e5adcc354 (patch)
treec1a390cb0d696450a2b9a4dfc57fd3f96eedb11c /Source/SPBundleHTMLOutputController.m
parente638ab4bc8e1414b6333370af07f851bd218f623 (diff)
downloadsequelpro-38eae1b30dc9eb65138741079737cb3e5adcc354.tar.gz
sequelpro-38eae1b30dc9eb65138741079737cb3e5adcc354.tar.bz2
sequelpro-38eae1b30dc9eb65138741079737cb3e5adcc354.zip
Move the BASH command code from the string additions category to remove the dependency on SP specific code and all the tests to build successfully.
Diffstat (limited to 'Source/SPBundleHTMLOutputController.m')
-rw-r--r--Source/SPBundleHTMLOutputController.m20
1 files changed, 11 insertions, 9 deletions
diff --git a/Source/SPBundleHTMLOutputController.m b/Source/SPBundleHTMLOutputController.m
index cff150c0..d31a5d28 100644
--- a/Source/SPBundleHTMLOutputController.m
+++ b/Source/SPBundleHTMLOutputController.m
@@ -26,6 +26,7 @@
#import "SPAlertSheets.h"
#import "SPPrintAccessory.h"
#import "SPAppController.h"
+#import "SPBundleCommandRunner.h"
@class WebScriptCallFrame;
@@ -659,7 +660,7 @@
NSString *output = nil;
if(uuid == nil)
- output = [command runBashCommandWithEnvironment:nil atCurrentDirectoryPath:nil error:&err];
+ output = [SPBundleCommandRunner runBashCommand:command withEnvironment:nil atCurrentDirectoryPath:nil error:&err];
else {
NSMutableDictionary *theEnv = [NSMutableDictionary dictionary];
[theEnv addEntriesFromDictionary:[[NSApp delegate] shellEnvironmentForDocument:nil]];
@@ -668,15 +669,16 @@
[theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultPathHeader, uuid] forKey:SPBundleShellVariableQueryResultFile];
[theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultStatusPathHeader, uuid] forKey:SPBundleShellVariableQueryResultStatusFile];
[theEnv setObject:[NSString stringWithFormat:@"%@%@", SPURLSchemeQueryResultMetaPathHeader, uuid] forKey:SPBundleShellVariableQueryResultMetaFile];
- output = [command runBashCommandWithEnvironment:theEnv
+
+ output = [SPBundleCommandRunner runBashCommand:command
+ withEnvironment:theEnv
atCurrentDirectoryPath:nil
- callerInstance:[NSApp delegate]
- contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
- @"JavaScript", @"name",
- NSLocalizedString(@"General", @"general menu item label"), @"scope",
- uuid, SPBundleFileInternalexecutionUUID,
- nil]
- error:&err];
+ callerInstance:[NSApp delegate]
+ contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
+ @"JavaScript", @"name",
+ NSLocalizedString(@"General", @"general menu item label"), @"scope",
+ uuid, SPBundleFileInternalexecutionUUID, nil]
+ error:&err];
}
if(err != nil) {