Open Zetacat opened 8 months ago
That's quite weird, I found out that the spaces in the path are escaped in the code.
in Whisky/WhiskyKit/Sources/WhiskyKit/Extensions/URL+Extensions.swift
:
extension String {
public var esc: String {
let esc = ["\\", "\"", "'", " ", "(", ")", "[", "]", "{", "}", "&", "|",
";", "<", ">", "`", "$", "!", "*", "?", "#", "~", "="]
var str = self
for char in esc {
str = str.replacingOccurrences(of: char, with: "\\" + char)
}
return str
}
}
Description
I encountered a bug related to the "Create Shortcut" feature. This feature allows users to create macOS shortcuts for quickly launching target applications. However, shortcuts fail to launch when the target executable's path contains spaces.
Some workaround
After I manually modified the shell script in the "launch" file, the shortcut can be executed normally.
original script:
modified script:
Steps to reproduce
/Users/{username}/Library/Containers/com.isaacmarovitz.Whisky/Bottles/76EA5598-DC91-479B-982A-2A41E35879B2/drive_c/Program Files (x86)/Steam/Steam.exe
Workaround:
Contents/MacOS/launch
with any text editing app.""
, save the file.Expected behaviour
The shortcut successfully launches the Windows application through Whisky.
Logs
What version of Whisky are you using?
2.2.4
What version of macOS are you using?
Sonoma (macOS 14)
Issue Language