-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
use-node-version isn't respected if the first download fails #4104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Happy to help with this by the way. I think I'd mainly be curious which approach is preferred:
|
yes, we should do this
use the path-temp lib. Same as we do it here:
|
gluxon
added a commit
to gluxon/pnpm
that referenced
this issue
Dec 13, 2021
gluxon
added a commit
to gluxon/pnpm
that referenced
this issue
Dec 13, 2021
gluxon
added a commit
to gluxon/pnpm
that referenced
this issue
Dec 13, 2021
gluxon
added a commit
to gluxon/pnpm
that referenced
this issue
Dec 15, 2021
gluxon
added a commit
to gluxon/pnpm
that referenced
this issue
Dec 15, 2021
zkochan
pushed a commit
that referenced
this issue
Dec 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
pnpm version: 6.23.6
Code to reproduce the issue:
Suppose
use-node-version
is set:If you were to exit
pnpm
while it downloads that version:pnpm doesn't appear to re-attempt that download. It defaults to the system version for all future calls:
The
~/Library/pnpm/nodejs/16.13.0
dir stays empty in that case:Running
rm -rf ~/Library/pnpm/nodejs/16.13.0
gets things to work as expected again.Expected behavior:
Should pnpm re-attempt to download node if it didn't finish or failed in the past?
Alternatively pnpm could set up it's Node.js download more atomically. So
~/Library/pnpm/nodejs/<version>
only gets created after the tarball/zip download is complete.Actual behavior:
pnpm detects that the empty
~/Library/pnpm/nodejs/16.13.0
dir exists and assumesnode
is in that path. Wrong node version is used from that point on.Additional information:
node -v
prints: v17.2.0The text was updated successfully, but these errors were encountered: