Skip to content

fix(file_operations): convert MSYS paths to Windows paths on Windows - #1

Merged
Embracex1998 merged 1 commit into
mainfrom
fix-windows-path-mapping
Jun 2, 2026
Merged

fix(file_operations): convert MSYS paths to Windows paths on Windows#1
Embracex1998 merged 1 commit into
mainfrom
fix-windows-path-mapping

Conversation

@Embracex1998

Copy link
Copy Markdown
Owner

On Windows with MSYS/Git-Bash, the shell returns paths like /c/Users/... and /d/code/... but Python expects C:/Users/... and D:/code/...

This caused write_file to write files to the wrong location - files appeared to exist when checked via Python but were not visible in Windows Explorer or to terminal commands using Windows paths.

The fix adds a _msys_to_windows_path() method that converts MSYS-style drive paths (/c/, /d/, etc.) to Windows-style paths (C:/, D:/, etc.)

Fixes NousResearch#37144

What does this PR do?

Related Issue

Fixes #

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

How to Test

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run pytest tests/ -q and all tests pass
  • I've added tests for my changes (required for bug fixes, strongly encouraged for features)
  • I've tested on my platform:

Documentation & Housekeeping

  • I've updated relevant documentation (README, docs/, docstrings) — or N/A
  • I've updated cli-config.yaml.example if I added/changed config keys — or N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — or N/A
  • I've considered cross-platform impact (Windows, macOS) per the compatibility guide — or N/A
  • I've updated tool descriptions/schemas if I changed tool behavior — or N/A

For New Skills

  • This skill is broadly useful to most users (if bundled) — see Contributing Guide
  • SKILL.md follows the standard format (frontmatter, trigger conditions, steps, pitfalls)
  • No external dependencies that aren't already available (prefer stdlib, curl, existing Hermes tools)
  • I've tested the skill end-to-end: hermes --toolsets skills -q "Use the X skill to do Y"

Screenshots / Logs

On Windows with MSYS/Git-Bash, the shell returns paths like /c/Users/...
and /d/code/... but Python expects C:/Users/... and D:/code/...

This caused write_file to write files to the wrong location - files
appeared to exist when checked via Python but were not visible in
Windows Explorer or to terminal commands using Windows paths.

The fix adds a _msys_to_windows_path() method that converts MSYS-style
drive paths (/c/, /d/, etc.) to Windows-style paths (C:/, D:/, etc.)

Fixes NousResearch#37144
@Embracex1998
Embracex1998 merged commit b427e93 into main Jun 2, 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