Skip to content

Commit 0d383d6

Browse files
committed
Add osascript check
Yes, it'll be installed on macOS, but if the user has played games with their `$PATH`, the plugin may not be able to find it. Signed-off-by: Joe Block <[email protected]>
1 parent 19c7355 commit 0d383d6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lima-plugin

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ logger -t 'limamenu' "XBAR_PLUGIN=$XBAR_PLUGIN"
7171
function warnIfMissingDependencies() {
7272
local depsOK=1
7373
local warnings=""
74+
if ! has jq; then
75+
warnings=$(printf "${warnings}\njq is not in your PATH! - click for installation instructions | color=$STOPPED_VM_COLOR href=https://stedolan.github.io/jq/download/\n")
76+
depsOK=0
77+
fi
7478
if ! has limactl; then
7579
warnings=$(printf "${warnings}limactl is not in your PATH! - click to get started | color=$STOPPED_VM_COLOR href=https://github.com/lima-vm/lima#getting-started\n")
7680
depsOK=0
7781
fi
78-
if ! has jq; then
79-
warnings=$(printf "${warnings}\njq is not in your PATH! - click for installation instructions | color=$STOPPED_VM_COLOR href=https://stedolan.github.io/jq/download/\n")
82+
if ! has osascript; then
83+
warnings=$(printf "${warnings}osascript is not in your PATH! - click to get started | color=$STOPPED_VM_COLOR\n")
8084
depsOK=0
8185
fi
8286
if [[ depsOK -eq 0 ]]; then

0 commit comments

Comments
 (0)