Skip to content

fix/space-dev-tooling-docs#1335

Open
simwai wants to merge 1 commit intocoreybutler:masterfrom
simwai:fix-elevatedrun-spaces
Open

fix/space-dev-tooling-docs#1335
simwai wants to merge 1 commit intocoreybutler:masterfrom
simwai:fix-elevatedrun-spaces

Conversation

@simwai
Copy link

@simwai simwai commented Mar 18, 2026

Summary

This PR fixes path handling for installations on Windows paths containing spaces and introduces an isolated test-env workflow for local development and testing.

Path handling fix (spaces)

  • Correctly handles NVM_HOME, NVM_SYMLINK, and related paths when they contain spaces (for example under C:\Users\Some User\...).
  • Ensures all relevant commands and helpers quote paths consistently so installs, nvm use, and symlink updates work reliably on typical user directories.
  • Prevents failures where Node or nvm.exe could not be found/executed solely due to unquoted paths with spaces.

This makes nvm-windows robust in more realistic setups where the repo, NVM root, or Node target directories live under user profiles or other spaced paths.

New test-env workflow

Adds a small PowerShell helper to provide a fully isolated local environment for working on nvm.exe without affecting the original dist output or global Node installations.

  • New script: setup-test-env.ps1
    • Creates/refreshes ./test-env.
    • Copies everything from ./dist into ./test-env
    • Copies helper/elevation scripts from ./assets into ./test-env (if present).
    • Generates a ./test-env/settings.txt pointing root and path to ./test-env and ./test-env/nodejs.
    • Sets NVM_HOME and NVM_SYMLINK for the current PowerShell session and prepends test-env to PATH.
    • When dot-sourced, switches the current directory to ./test-env for immediate use.

Example usage:

Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process
. .\setup-test-env.ps1   # dot-source

.\nvm.exe install 20
.\nvm.exe use 20
node -v

Why?

  • The path fix resolves a class of issues where installations under user-profile directories with spaces would break or behave inconsistently.
  • The test-env workflow gives contributors a safe playground for rapid (, happy) contributing

…or easier dev life. I also updated the documentation and the .gitignore file. I also updated the dependencies (as a side effect).
@simwai simwai changed the title Fixed broken file paths, because of spaces, and added build tooling for easier dev life. I also updated the documentation and the .gitignore file. I also updated the dependencies (as a side effect). fix/space-dev-tooling-docs Mar 18, 2026
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

Successfully merging this pull request may close these issues.

1 participant