Skip to content

Make direnv hook output work on Windows#632

Merged
zimbatm merged 1 commit intodirenv:masterfrom
pjeby:windows-hook-path-fix
May 8, 2020
Merged

Make direnv hook output work on Windows#632
zimbatm merged 1 commit intodirenv:masterfrom
pjeby:windows-hook-path-fix

Conversation

@pjeby
Copy link
Copy Markdown
Contributor

@pjeby pjeby commented May 8, 2020

Without this fix, you have to write your own _direnv_hook to run on Cygwin or msys/git bash, because the backslashes are currently interpreted as escapes within the string, rather than actual characters.

(Technically, all the Hook functions should be escaping .SelfPath in their templates, but that's a much bigger change since most of the shell implementations don't have an escape method, and doing the escaping internal to the Hook method means changing a lot of files.)

@zimbatm zimbatm merged commit 98dca18 into direnv:master May 8, 2020
@zimbatm
Copy link
Copy Markdown
Member

zimbatm commented May 8, 2020

thanks!

@pjeby pjeby deleted the windows-hook-path-fix branch May 8, 2020 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants