Closed marovira closed 11 months ago
An alternative option that could work is if we added a note on the README explaining what needs to be changed? It would make updating antidote annoying since the user would have to go in and stash the change prior to updating, but maybe that's not a huge issue since git-bash is a more specific use case?
Good news! I have a better solution that will solve everything consistently. I completely forgot that msys and cygwin (git-bash gets this by extension) have a command called cygpath
that converts windows paths to POSIX. This would fully solve the issue since it would be guaranteed to always work regardless of the environment. The only issue is that using cygpath
will obviously break the tests on Linux/MacOS since that's a Windows only thing. I'm not really sure what you want to do here. The easiest solution is to remove the tests for cygwin/msys for getting the home directory, but I don't know if that's something you'd want to do.
Just to update: I managed to figure out a way to make a Windows runner switch to zsh successfully. The issue now is that git-bash has a very limited subset of bash commands, with some having restricted options. You can see the logs on the last attempt (see test-win
) for details. At this point I honestly don't know what should be done. Given what I've done and tested, I can see three (not so great) options:
msys
from test_cmd_home.md
. That will allow the tests to run but you'd be skipping one test case, which given how much setup is required to get it to run... seems like a fair trade-off.It's ultimately up to you. We can also just nix the whole thing and just add a note to the original issue about how to solve it and then refer people to that.
Thanks for the effort here. I have some time today to look and see where we can go from here.
I appreciate the attempt. The work that went into the yaml CI workflows was a great start. In the meantime I found an old clunker running Windows I was able to test git-bash on, so I feel I can at least support it myself without proper CI for now. If we ever want to give this another go, we can reopen.
This fully fixes the issue where the paths on git-bash are wrong. There are however a few things to review:
/
to the start of the path and makes everything lower-case. Ignoring the lower-case issue, the underlying problem is that manually adding this would make it so$HOME
becomes invalid in the tests. What I came up with is to construct the location of AppData directly using the$HOME
variable itself. The thing is... I'm not entirely sure that this is always going to work (I don't have msys or cygwin so I can't confirm this) since the$HOME
variable could very well point to something else. The issue with usingLOCALAPPDATA
directly is that git-bash does not convert from Windows to POSIX path on system variables, so the path would come out wrong. I'm not really sure what the best solution is, but I'm open to suggestions.zsh
for some reason b. The testing code relies on functions that do not exist on git-bash (mainlysubenv
). So even if the shell got switched, it wouldn't work because of the missing commands.Bottom-line: I don't really know if there is a "best" solution here that would fully fix everything. We can kind of fudge the testing on Windows since the tests already verify all of the possible OS configurations, but it doesn't fully address the issue.