Skip to content

Fix Windows CLI file URL path handling - #25

Open
Peter7896 wants to merge 1 commit into
cliffano:mainfrom
Peter7896:peter7896/windows-cli-file-url-path
Open

Fix Windows CLI file URL path handling#25
Peter7896 wants to merge 1 commit into
cliffano:mainfrom
Peter7896:peter7896/windows-cli-file-url-path

Conversation

@Peter7896

Copy link
Copy Markdown

Closes #24

Summary

  • Converts the ESM module URL with fileURLToPath before passing the base directory to bagofcli.
  • Prevents Windows file URLs from being treated as path strings such as /C:/..., which can become duplicated drive-letter paths when bagofcli reads conf/commands.json.
  • Adds a CLI regression test that asserts bagofcli receives the native filesystem directory.

Validation

  • npm ci --ignore-scripts --no-audit --no-fund
  • npx mocha test\cli.js
  • npx mocha test/**/*.js
  • node bin\rtk.js --help
  • npx eslint lib\cli.js test\cli.js
  • git diff --check

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.

rtk init --global fails on Windows with double path prefix (C:\C:\)

1 participant