diff --git a/xbar/mise-updates.1h.rb b/xbar/mise-updates.1h.rb
index d6daaf2..6c02112 100755
--- a/xbar/mise-updates.1h.rb
+++ b/xbar/mise-updates.1h.rb
@@ -4,7 +4,7 @@
# rubocop:disable Layout/LineLength
# Mise Updates
-# v0.1.0
+# v0.1.1
# Jim Myhrberg
# jimeh
# List and manage outdated tools installed with mise
@@ -606,6 +606,9 @@ module Mise
end
return unless env_tools.size.positive?
+ mise_cmd_args = [mise_path]
+ mise_cmd_args += ['--cd', env.path] unless env.global?
+
printer.sep
printer.item(env.full_name)
@@ -626,13 +629,13 @@ module Mise
cmds = []
if to_install.size.positive?
- cmds += [mise_path, 'install'] + to_install.map do |t|
+ cmds += mise_cmd_args + ['install'] + to_install.map do |t|
t.install_arg(env)
end
end
if to_upgrade.size.positive?
cmds << '&&' if cmds.size.positive?
- cmds += [mise_path, 'upgrade'] + to_upgrade.map do |t|
+ cmds += mise_cmd_args + ['upgrade'] + to_upgrade.map do |t|
t.upgrade_arg(env)
end
end
@@ -678,7 +681,7 @@ module Mise
text,
alt: alt_text || text,
terminal: true, refresh: true,
- shell: [mise_path, mise_operation.to_s, tool_arg]
+ shell: mise_cmd_args + [mise_operation.to_s, tool_arg]
)
printer.sep
@@ -761,8 +764,8 @@ module Mise
printer.item(
'Yes',
terminal: true, refresh: true,
- shell: [
- mise_path, 'uninstall', "#{tool.name}@#{v.version}"
+ shell: mise_cmd_args + [
+ 'uninstall', "#{tool.name}@#{v.version}"
]
)
end