raycast / extensions

Everything you need to extend Raycast.
https://developers.raycast.com
MIT License
5.01k stars 2.74k forks source link

[Mozilla Firefox] failing checkAppInstalled despite osascript returning true #12466

Open matthewcpollard opened 1 month ago

matthewcpollard commented 1 month ago

Extension

https://www.raycast.com/crisboarna/mozilla-firefox

Raycast Version

1.74.1

macOS Version

14.2.1 (23C71)

Description

Extension returns Error(NOT_INSTALLED_MESSAGE); Problem is index.ts, line 78 method checkAppInstalled

in this AppleScript call

runAppleScript(`
set isInstalled to false
try
    do shell script "osascript -e 'exists application \\"Firefox\\"'"
    set isInstalled to true
end try

Running in my terminal, applescript see's Firefox installed

>osascript -e 'exists application "Firefox"'
>true

The full command in applescript gives this error causing try to fail

osascript -e 'do shell script \"osascript -e \'exists application \\\\"Firefox\\\\"\'\"'
16:17: syntax error: Expected “given”, “in”, “of”, expression, “with”, “without”, other parameter name, etc. but found unknown token. (-2741)

Steps To Reproduce

brew install firefox install extension 'Mozilla Firefox' open any extension command

Current Behaviour

checkAppInstalled at index.ts fails, throw new Error(NOT_INSTALLED_MESSAGE);

Expected Behaviour

checkAppInstalled returns true

raycastbot commented 1 month ago

Thank you for opening this issue!

🔔 @crisboarna @grandkrav you might want to have a look.

💡 Author and Contributors commands The author and contributors of `crisboarna/mozilla-firefox` can trigger bot actions by commenting: - `@raycastbot close this issue` Closes the issue. - `@raycastbot rename this issue to "Awesome new title"` Renames the issue. - `@raycastbot reopen this issue` Reopens the issue. - `@raycastbot assign me` Assigns yourself to the issue. - `@raycastbot good first issue` Adds the "Good first issue" label to the issue.