aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.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/SPTextViewAdditions.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/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 8c5043cf..e8eb838e 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -35,6 +35,7 @@
#import "SPTextView.h"
#import "SPWindowController.h"
#import "SPDatabaseDocument.h"
+#import "SPBundleCommandRunner.h"
@implementation NSTextView (SPTextViewAdditions)
@@ -651,15 +652,14 @@
return;
}
- NSString *output = [cmd runBashCommandWithEnvironment:env
- atCurrentDirectoryPath:nil
- callerInstance:[(SPAppController*)[NSApp delegate] frontDocument]
- contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
- ([cmdData objectForKey:SPBundleFileNameKey])?:@"-", @"name",
- NSLocalizedString(@"Input Field", @"input field menu item label"), @"scope",
- uuid, SPBundleFileInternalexecutionUUID,
- nil]
- error:&err];
+ NSString *output = [SPBundleCommandRunner runBashCommand:cmd withEnvironment:env
+ atCurrentDirectoryPath:nil
+ callerInstance:[(SPAppController*)[NSApp delegate] frontDocument]
+ contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
+ ([cmdData objectForKey:SPBundleFileNameKey])?:@"-", @"name",
+ NSLocalizedString(@"Input Field", @"input field menu item label"), @"scope",
+ uuid, SPBundleFileInternalexecutionUUID, nil]
+ error:&err];
[[NSFileManager defaultManager] removeItemAtPath:bundleInputFilePath error:nil];