Repository navigation
Adjusted hook tests to work on windows - #236
Conversation
|
Apparently my local setup is different from the CI system. |
|
@dr-BEat thanks for looking into it. Is the wsl default installed on every Windows nowadays? Or do we have to simulate it by using a vanilla windows without wsl? |
|
@extrawurst no problem. Its not installed by default, however I think they added a |
|
Any idea how to fix this? Maybe just install some git using chocolaty in the ci? |
|
Yeah installing git might fix it. |
|
Gits already installed in the CI image. (: |
|
According to this blog by Jon Skeet https://codeblog.jonskeet.uk/2019/10/12/using-git-bash-from-appveyor/ the order of directories in the Path environment can break stuff. |
|
@dr-BEat any more ideas? |
|
@extrawurst nothing concrete but I will try some tricks, probably the path is not correct still |
|
@extrawurst the path environment is correct, the problem is that |
|
@dr-BEat interesting. maybe because we run the |
|
@extrawurst I do not think its related to the shell. I can reproduce the issue locally when just running cargo test from Powershell |
|
@dr-BEat nice a repro is what we needed!!🥳 I wish I could add any windows knowledge whatsoever :( |
|
@extrawurst found it! Calling |
|
OMFG!!! you are the man!! |
| let output = Command::new("bash") | ||
| .args(bash_args) | ||
| .current_dir(path) | ||
| .env("DUMMYENV", "FixPathHandlingOnWindows") // This call forces Command to handle the Path environment correctly on windows, the specific env set here does not matter |
There was a problem hiding this comment.
wtf... this is crazy! 🙈
This PR fixes #235.
The extra newline at the beginning of the hook caused the following error on windows:
error: cannot spawn .git/hooks/commit-msg: No such file or directory