Repository navigation
Fix incorrect repo path on Windows for mlc add repo command - #332
Draft
arjunsuresh with Copilot wants to merge 3 commits into
Draft
arjunsuresh with Copilot wants to merge 3 commits into
arjunsuresh with Copilot wants to merge 3 commits into
Conversation
…tem paths Co-authored-by: arjunsuresh <4791823+arjunsuresh@users.noreply.github.com>
Co-authored-by: arjunsuresh <4791823+arjunsuresh@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix incorrect repo path on Windows for mlc add repo command
Fix incorrect repo path on Windows for mlc add repo command
Oct 23, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mlc add repo <path>silently registered the wrong path when the given path did not exist or was inaccessible. On Windows this reliably hits a mounted/network drive that is not visible to the running process (per-session mapped-drive / UAC quirk):mlc add repo Z:\pa\aocc-scriptsregisteredC:\Users\amd\MLC\repos\aocc-scriptswith no error.Root cause — In
RepoAction.add, whenos.path.exists(input)is False the code assumed the input was a bare repo name and created/registered<repos_path>/<basename>. An explicit but temporarily-unreachable path fell into this branch.Changes
mlc/repo_action.py_looks_like_filesystem_path()— flags absolute paths, anything containing a separator, Windows drive letters (Z:\…/Z:/…), and UNC paths. Recognized on any OS so behavior is testable off-Windows.addnow fails loudly with a clear error when an explicit path is missing/inaccessible, instead of creating the wrong folder. Bare names, URLs, and existing external paths are unchanged.tests/test_repo_action_add_path.py— covers the helper plusaddbehavior (missing explicit path errors without creating a stray folder; Windows-style path errors on any platform; existing external path registers as-is)..github/workflows/test-unit.yml— newwindows-basic-commandsjob (windows-latest) running the repo-path tests, a basicmlccommand smoke test (add/find/list/rm repo), and a regression check. Kept separate from the fullunittest discovermatrix because several existing tests drive the Unix bash installer and are not Windows-compatible.Behavior
✅ PR Checklist
✅ Testing & CI
📚 Documentation
📁 File Hygiene & Output Handling
🛡️ Safety & Security
🙌 Contribution Hygiene
Fixes #orCloses #.