From 0a5ec74fa5e0c5de887b61844a416fb6818547a3 Mon Sep 17 00:00:00 2001 From: bcherb2 Date: Wed, 18 Nov 2026 02:29:35 -0500 Subject: [PATCH] fix: ~/.local/bin ahead of npm-global so the mmdc wrapper wins npm's mmdc shadowed the ~/.local/bin wrapper that passes puppeteer the --no-sandbox config, so nvim's mermaid rendering failed on Ubuntu 24.04. No other ~/.local/bin wrapper shares a name with an npm-global binary. Brew still sits ahead of both: it has its own bat, herdr and python3.14, and moving it would change which of those runs. --- dot_local/bin/executable_mmdc | 3 +-- private_dot_zshrc | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dot_local/bin/executable_mmdc b/dot_local/bin/executable_mmdc index faa7a53..1ad40e4 100644 --- a/dot_local/bin/executable_mmdc +++ b/dot_local/bin/executable_mmdc @@ -5,8 +5,7 @@ # # It execs the real mmdc found later on PATH (the npm-global install), skipping # itself. A bare `mmdc` reaches this wrapper only if ~/.local/bin comes before -# the npm-global bin on PATH; where it does not, the real mmdc runs without the -# sandbox args. (.zshrc currently prepends ~/.npm-global/bin last, so it wins.) +# the npm-global bin on PATH, which is the order .zshrc sets. set -eu self=$(cd "$(dirname "$0")" && pwd -P)/$(basename "$0") diff --git a/private_dot_zshrc b/private_dot_zshrc index 794d2f4..48a4321 100644 --- a/private_dot_zshrc +++ b/private_dot_zshrc @@ -68,8 +68,10 @@ _prepend() { [[ -d $1 ]] && path=("$1" $path) } _append() { [[ -d $1 ]] && path=($path "$1") } _prepend "$HOME/bin" -_prepend "$HOME/.local/bin" +# ~/.local/bin after (so ahead of) npm-global: its wrappers -- mmdc with the +# puppeteer --no-sandbox config -- must win over the npm binary they wrap. _prepend "$HOME/.npm-global/bin" +_prepend "$HOME/.local/bin" _prepend "$HOME/code/speccy/bin" _append /usr/local/bin _append /usr/local/go/bin