From 38eae1b30dc9eb65138741079737cb3e5adcc354 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Mon, 7 May 2012 11:07:44 +0000 Subject: 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. --- Source/SPBundleEditorController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Source/SPBundleEditorController.m') 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 #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") -- cgit v1.2.3