Skip to content

Conversation

@robmaceachern
Copy link

@robmaceachern robmaceachern commented Feb 12, 2026

Note

Disclaimer: I'm not a go dev but hit this bug today and figured I'd throw up a PR with the assistance of AI. Feel free to mock and/or shame me 😂

Summary

  • quote all path-derived values emitted by Hermit activation scripts so eval is safe when environment roots contain spaces
  • quote command substitutions and path arguments used during activate/deactivate/update flows in POSIX and fish templates
  • add regression unit tests for generated activation scripts with space-containing roots
  • add an integration test that activates an environment located in a directory with spaces

How This Was Discovered

This surfaced while running Hermit from a CodexMonitor-managed git worktree. CodexMonitor stores worktrees under:

~/Library/Application Support/com.dimillian.codexmonitor/worktrees/...

Because Application Support contains a space, source bin/activate-hermit failed when hermit activate emitted unquoted export values. Shell eval split those values, causing activation errors in zsh/bash.

Testing

  • go test ./...
  • go test -tags=integration ./integration -run 'TestIntegration/ActivationWorksWhenPathContainsSpaces' -count=1

This response was drafted with AI assistance.

@robmaceachern robmaceachern marked this pull request as ready for review February 12, 2026 22:17
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