You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So..I was trying to run pnpm kondo in uc-node-services and ran into this:
[joseph.galindo@C02XK68RJG5L probot-pr-checklist (jrg/BT-3953)]$ pnpm kondo
Using Hermetic NodeJS v16.13.0
/usr/local/bin/pnpm: line 23: /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/../lib/hnvm/kondo.sh: No such file or directory
I thought that's weird, since I never remember having a problem with this script, at least in uc-frontend. I went to where it is on disk:
[joseph.galindo@C02XK68RJG5L lib]$ cd /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/
[joseph.galindo@C02XK68RJG5L hnvm]$ ls
colors.sh config.sh ensure_bin.sh kondo.sh
[joseph.galindo@C02XK68RJG5L hnvm]$ pwd
/usr/local/Cellar/hnvm/v0.12.7/lib/hnvm
[joseph.galindo@C02XK68RJG5L hnvm]$ ls /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/kondo.sh
/usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/kondo.sh
So I tried to log out what was happening to the $script_dir variable being relied on in hnvm, and found these:
[joseph.galindo@C02XK68RJG5L probot-pr-checklist (jrg/BT-3953)]$ pnpm kondo
derived script_dir is /usr/local/bin
derived script_dir in /usr/local/bin/pnpm is /usr/local/Cellar/hnvm/v0.12.7/bin
we are now sourcing /usr/local/Cellar/hnvm/v0.12.7/bin/../lib/hnvm/ensure_bin.sh in the /usr/local/bin/pnpm code
script_dir in usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/ensure_bin is /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm
Using Hermetic NodeJS v16.13.0
derived script_dir in /usr/local/bin/pnpm is /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm
/usr/local/bin/pnpm: line 29: /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/../lib/hnvm/kondo.sh: No such file or directory
derived script_dir in /usr/local/bin/pnpm is /usr/local/Cellar/hnvm/v0.12.7/lib/hnvm
^^^ this is not good, we probably don't expect this value to change at all
Both set up their own variable $script_dir. When the pnpm bin script bash sources the ensure_bin.sh script, I think the variable from ensure_bin.sh is sourced and shadows the variable in pnpm. Which can break the pnpm kondo logic since it relies on that variable.
To work around the issue, I changed pnpm locally to use source "$script_dir/kondo.sh" "${node_bin}" "${pnpm_bin}, but we probably need to fix upstream in hnvm itself.
The text was updated successfully, but these errors were encountered:
First, confirmed the version of hnvm I'm using:
So..I was trying to run
pnpm kondo
inuc-node-services
and ran into this:I thought that's weird, since I never remember having a problem with this script, at least in uc-frontend. I went to where it is on disk:
So I tried to log out what was happening to the
$script_dir
variable being relied on in hnvm, and found these:It looks like these files:
/usr/local/bin/pnpm
/usr/local/Cellar/hnvm/v0.12.7/lib/hnvm/ensure_bin.sh
Both set up their own variable
$script_dir
. When thepnpm
bin script bash sources theensure_bin.sh
script, I think the variable fromensure_bin.sh
is sourced and shadows the variable inpnpm
. Which can break thepnpm kondo
logic since it relies on that variable.To work around the issue, I changed
pnpm
locally to usesource "$script_dir/kondo.sh" "${node_bin}" "${pnpm_bin}
, but we probably need to fix upstream in hnvm itself.The text was updated successfully, but these errors were encountered: