aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPBundleEditorController.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/SPBundleEditorController.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/SPBundleEditorController.m')
-rw-r--r--Source/SPBundleEditorController.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPBundleEditorController.m b/Source/SPBundleEditorController.m
index 8d4d1c65..b807a52d 100644
--- a/Source/SPBundleEditorController.m
+++ b/Source/SPBundleEditorController.m
@@ -23,8 +23,8 @@
// More info at <http://code.google.com/p/sequel-pro/>
#import "SPBundleEditorController.h"
-#import "SPArrayAdditions.h"
#import "SPMenuAdditions.h"
+#import "SPBundleCommandRunner.h"
#define kBundleNameKey @"bundleName"
#define kChildrenKey @"_children_"
@@ -1021,7 +1021,9 @@
// Use a AppleScript script since NSWorkspace performFileOperation or NSFileManager moveItemAtPath
// have problems probably due access rights.
NSString *moveToTrashCommand = [NSString stringWithFormat:@"osascript -e 'tell application \"Finder\" to move (POSIX file \"%@\") to the trash'", thePath];
- [moveToTrashCommand runBashCommandWithEnvironment:nil atCurrentDirectoryPath:nil error:&error];
+
+ [SPBundleCommandRunner runBashCommand:moveToTrashCommand withEnvironment:nil atCurrentDirectoryPath:nil error:&error];
+
if(error != nil) {
NSAlert *alert = [NSAlert alertWithMessageText:[NSString stringWithFormat:NSLocalizedString(@"Error while moving “%@” to Trash.", @"Bundle Editor : Trash-Bundle(s)-Error : error dialog title"), thePath]
defaultButton:NSLocalizedString(@"OK", @"Bundle Editor : Trash-Bundle(s)-Error : OK button")