Build the launcher's extension on a machine that has only nvm
The search extension is compiled, and the stage that compiles it checked for npm and skipped quietly when it found none. On this machine it always found one -- but only because Claude Desktop depends on nodejs and dragged a system npm in. Nowhere else would. Node moved to nvm when the shell config turned out to have been assuming it for months, and nvm is a shell function in a file only an interactive shell sources; a stage is not one. So a fresh install would have set up the launcher, printed one line about extensions not being built, and left somebody wondering why typing in it suggested nothing. The stage sources nvm before looking, and the contract pins that it does -- checking for npm is not the same as being able to find it. Claude-Session: https://claude.ai/code/session_01Q84axqUE5inJhf5Jz9CFy1
This commit is contained in:
@@ -60,6 +60,22 @@ ln -s "$source_dir" "$target_dir"
|
||||
# extension that did not build is a launcher missing one command, not a desktop
|
||||
# that failed to install.
|
||||
extensions_source="$panama_path/config/local/share/vicinae/extensions"
|
||||
|
||||
# npm comes from nvm, and nvm is a shell function in a file that only an
|
||||
# interactive shell sources. A stage is not one, so without this npm is simply
|
||||
# absent and the build below is skipped -- silently, which is the whole problem.
|
||||
#
|
||||
# This machine hid the bug: /usr/sbin/npm existed, but only because Claude
|
||||
# Desktop depends on nodejs and dragged it in. A machine without that would have
|
||||
# installed the launcher and quietly not built its search extension.
|
||||
if [[ -s /etc/profile.d/nvm.sh ]] && ! command -v npm >/dev/null 2>&1; then
|
||||
# nvm's script reads unset variables, which `set -u` treats as fatal.
|
||||
set +u
|
||||
# shellcheck source=/dev/null
|
||||
source /etc/profile.d/nvm.sh
|
||||
set -u
|
||||
fi
|
||||
|
||||
if [[ -d "$extensions_source" ]] && command -v npm >/dev/null 2>&1; then
|
||||
for extension in "$extensions_source"/*/; do
|
||||
[[ -f "$extension/package.json" ]] || continue
|
||||
|
||||
Reference in New Issue
Block a user