diff --git a/.mux/init b/.mux/init index 7bb1c30..95f322a 100755 --- a/.mux/init +++ b/.mux/init @@ -22,7 +22,16 @@ if [ -z "$_mux_mise_bin" ]; then fi echo "[mux:init] using mise at $_mux_mise_bin" + +_mux_mise_config="$PWD/mise.toml" +if [ -f "$_mux_mise_config" ]; then + # Worktree workspaces live at unique paths, so mise treats each workspace copy + # as a newly untrusted config until it is explicitly trusted. + "$_mux_mise_bin" trust -y "$_mux_mise_config" >/dev/null 2>&1 || true +fi + "$_mux_mise_bin" install "$_mux_mise_bin" run bootstrap unset _mux_mise_bin +unset _mux_mise_config diff --git a/.mux/tool_env b/.mux/tool_env index 0a95f83..09dd18d 100644 --- a/.mux/tool_env +++ b/.mux/tool_env @@ -14,7 +14,15 @@ elif [ -x "/usr/local/bin/mise" ]; then fi if [ -n "$_mux_mise_bin" ]; then + _mux_mise_config="$PWD/mise.toml" + if [ -f "$_mux_mise_config" ]; then + # New worktree paths start untrusted, and bash commands may run before the + # async init hook finishes trusting the copied mise.toml. + "$_mux_mise_bin" trust -y "$_mux_mise_config" >/dev/null 2>&1 || true + fi + eval "$("$_mux_mise_bin" activate bash --shims 2>/dev/null)" || true fi unset _mux_mise_bin +unset _mux_mise_config