aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPCopyTable.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/SPCopyTable.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/SPCopyTable.m')
-rw-r--r--Source/SPCopyTable.m19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/SPCopyTable.m b/Source/SPCopyTable.m
index ea0fe720..edc29db9 100644
--- a/Source/SPCopyTable.m
+++ b/Source/SPCopyTable.m
@@ -40,6 +40,8 @@
#import "SPAppController.h"
#endif
#import "SPTablesList.h"
+#import "SPBundleCommandRunner.h"
+
#import <SPMySQL/SPMySQL.h>
NSInteger SPEditMenuCopy = 2001;
@@ -1407,15 +1409,14 @@ static const NSInteger kBlobAsImageFile = 4;
}
- NSString *output = [cmd runBashCommandWithEnvironment:env
- atCurrentDirectoryPath:nil
- callerInstance:[[NSApp delegate] frontDocument]
- contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
- ([cmdData objectForKey:SPBundleFileNameKey])?:@"-", @"name",
- NSLocalizedString(@"Data Table", @"data table menu item label"), @"scope",
- uuid, SPBundleFileInternalexecutionUUID,
- nil]
- error:&err];
+ NSString *output = [SPBundleCommandRunner runBashCommand:cmd withEnvironment:env
+ atCurrentDirectoryPath:nil
+ callerInstance:[[NSApp delegate] frontDocument]
+ contextInfo:[NSDictionary dictionaryWithObjectsAndKeys:
+ ([cmdData objectForKey:SPBundleFileNameKey])?:@"-", @"name",
+ NSLocalizedString(@"Data Table", @"data table menu item label"), @"scope",
+ uuid, SPBundleFileInternalexecutionUUID, nil]
+ error:&err];
[[NSFileManager defaultManager] removeItemAtPath:bundleInputFilePath error:nil];