diff --git a/phpmon/Common/Helpers/Application.swift b/phpmon/Common/Helpers/Application.swift index 0f1b1fe..b0f0370 100644 --- a/phpmon/Common/Helpers/Application.swift +++ b/phpmon/Common/Helpers/Application.swift @@ -33,8 +33,8 @@ class Application { Attempt to open a specific directory in the app of choice. (This will open the app if it isn't open yet.) */ - @objc public func openDirectory(file: String) async { - return await Shell.quiet("/usr/bin/open -a \"\(name)\" \"\(file)\"") + @objc public func openDirectory(file: String) { + Task { await Shell.quiet("/usr/bin/open -a \"\(name)\" \"\(file)\"") } } /** Checks if the app is installed. */ diff --git a/phpmon/Domain/DomainList/DomainListVC+Actions.swift b/phpmon/Domain/DomainList/DomainListVC+Actions.swift index 877b0b6..f12da19 100644 --- a/phpmon/Domain/DomainList/DomainListVC+Actions.swift +++ b/phpmon/Domain/DomainList/DomainListVC+Actions.swift @@ -30,17 +30,17 @@ extension DomainListVC { NSWorkspace.shared.open(url) } - @objc func openInFinder() async { - await Shell.quiet("open '\(selectedSite!.absolutePath)'") + @objc func openInFinder() { + Task { return await Shell.quiet("open '\(selectedSite!.absolutePath)'") } } - @objc func openInTerminal() async { - await Shell.quiet("open -b com.apple.terminal '\(selectedSite!.absolutePath)'") + @objc func openInTerminal() { + Task { await Shell.quiet("open -b com.apple.terminal '\(selectedSite!.absolutePath)'") } } - @objc func openWithEditor(sender: EditorMenuItem) async { + @objc func openWithEditor(sender: EditorMenuItem) { guard let editor = sender.editor else { return } - await editor.openDirectory(file: selectedSite!.absolutePath) + editor.openDirectory(file: selectedSite!.absolutePath) } // MARK: - UI interaction