From d68b3c8b3799e568c2235498f2a12b6223871124 Mon Sep 17 00:00:00 2001 From: kkHAIKE Date: Thu, 19 Dec 2024 20:36:42 +0800 Subject: [PATCH] WhiskyCmd: fix the run command FIX: https://github.com/Whisky-App/Whisky/issues/1088 FIX: https://github.com/Whisky-App/Whisky/issues/1140 --- WhiskyCmd/Main.swift | 1 + WhiskyKit/Sources/WhiskyKit/Extensions/Program+Extensions.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/WhiskyCmd/Main.swift b/WhiskyCmd/Main.swift index fc599895..3197b9bd 100644 --- a/WhiskyCmd/Main.swift +++ b/WhiskyCmd/Main.swift @@ -176,6 +176,7 @@ extension Whisky { let url = URL(fileURLWithPath: path) let program = Program(url: url, bottle: bottle) program.runInTerminal() + RunLoop.main.run() } } diff --git a/WhiskyKit/Sources/WhiskyKit/Extensions/Program+Extensions.swift b/WhiskyKit/Sources/WhiskyKit/Extensions/Program+Extensions.swift index 8d589187..78265569 100644 --- a/WhiskyKit/Sources/WhiskyKit/Extensions/Program+Extensions.swift +++ b/WhiskyKit/Sources/WhiskyKit/Extensions/Program+Extensions.swift @@ -54,6 +54,7 @@ extension Program { public func runInTerminal() { let wineCmd = generateTerminalCommand().replacingOccurrences(of: "\\", with: "\\\\") + .replacingOccurrences(of: "\"", with: "\\\"") let script = """ tell application "Terminal"