Skip to content

Conversation

@wesm
Copy link
Owner

@wesm wesm commented Feb 6, 2026

Summary

Fixes #86

  • Windows CMD does not strip single quotes from arguments, so --home 'C:\Users\foo' passes the literal value 'C:\Users\foo' (quotes included), producing broken paths like 'C:\Users\foo'\config.toml
  • expandPath() now strips matching surrounding single or double quotes before processing, covering --home, --config, and MSGVAULT_HOME paths

Test plan

  • TestExpandPath — new cases for single-quoted, double-quoted, mismatched, and single-char inputs
  • make lint — clean
  • make test — all pass

🤖 Generated with Claude Code

Windows CMD does not strip single quotes from arguments, so
`--home 'C:\Users\foo'` passes the literal value `'C:\Users\foo'`
(quotes included), producing broken paths like `'C:\...\'\config.toml`.

Strip matching surrounding single or double quotes in expandPath(),
which handles --home, --config, and MSGVAULT_HOME paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
On Unix, shells strip quotes before the process sees them, and literal
quote characters in paths are valid (if unusual). Guard the stripping
with runtime.GOOS == "windows" and mark the corresponding tests as
windowsOnly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wesm
Copy link
Owner Author

wesm commented Feb 6, 2026

I tested this locally and confirmed it resolves the issue when a user uses single quotes to pass the --home path

@wesm wesm merged commit 3fa1149 into main Feb 6, 2026
3 checks passed
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.

Reopen of #39 - specifying --config does not appear to work from Windows cmdline

1 participant