-
-
Notifications
You must be signed in to change notification settings - Fork 569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adjusted hook tests to work on windows #236
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!! |
@@ -105,6 +105,7 @@ fn run_hook( | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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