Skip to content
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

[Issue]: nvm run.cmd in %nvm_home% has a hardcoded path #1218

Open
KurzedMetal opened this issue Jan 7, 2025 · 5 comments
Open

[Issue]: nvm run.cmd in %nvm_home% has a hardcoded path #1218

KurzedMetal opened this issue Jan 7, 2025 · 5 comments

Comments

@KurzedMetal
Copy link

KurzedMetal commented Jan 7, 2025

What happened?

I ran by mistake run xyz instead of npm run xyz and got a weird error message generated by nvm's run.cmd exposed through %nvm_home% in PATH env variable.

Even tho I made a mistake, I don't think nvm should be exposing commands that a normal user shouldn't use (like development helper scripts/commands, etc), and definitely not a script that has a hardcoded path to the developer's OneDrive folder 😄

There are other scripts like "elevate", "install", "setuserenv", "uninst000", etc; that are being exposed by the PATH and I'm not sure if that's intended.

Sorry I'm not including an image of the output, I'm reporting from a computer that doesn't nvm installed.

What did you expect to happen?

Less development scripts exposed through %nvm_home% PATH
Minimal exposed scripts through PATH. Does user ever need anything else other than nvm.exe?
No exposed scripts with hardcoded directories that only a nvm developer can use.

Version

1.2.0 or newer (Default)

Which version of Windows?

Windows 11+ (Default)

Which locale?

English (Default)

Which shell are you running NVM4W in?

Command Prompt

User Permissions?

Administrative Privileges, Elevated

Is Developer Mode enabled?

No (Default)

Relevant log/console output

No response

Debug Output

Not needed

Anything else?

No response

Copy link

github-actions bot commented Feb 7, 2025

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale Stale label Feb 7, 2025
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 15, 2025
@VAllens
Copy link

VAllens commented Feb 18, 2025

灾难性更新

@VAllens
Copy link

VAllens commented Feb 18, 2025

Image

This is a rookie mistake that no developer should ever make, because hard-coding paths is extremely foolish.

@coreybutler
Copy link
Owner

This file was for testing purposes. It didn't get stripped out of the prod build. It won't be there when I release v1.2.3.

@coreybutler coreybutler reopened this Feb 18, 2025
@github-actions github-actions bot removed the Stale Stale label Feb 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants