-
Notifications
You must be signed in to change notification settings - Fork 989
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
[fix] Issues related to OSInfo.bash_path() #3455
[fix] Issues related to OSInfo.bash_path() #3455
Conversation
I need to fix also this test, but I need some advice about it... conan/conans/test/util/tools_test.py Line 813 in 860fb81
It fails when there is no bash_path = os_info.bash_path() # <--- Returns None!!!
bash_path = '"%s"' % bash_path if " " in bash_path else bash_path We can skip the test |
What you spotted is indeed a bug in the test, good catch. The |
The two lines from function
If there is no "bash" in the system,
To keep the test we need to mock the call to |
Yes, I think that mocking with tools.environment_append({"CONAN_BASH_PATH": "path\\to\\mybash.exe"}):
tools.run_in_windows_bash(conanfile, "a_command.bat", subsystem="cygwin")
self.assertIn('path\\to\\mybash.exe --login -c', conanfile._runner.command) Maybe it is good enough to set |
[fix] Issues related to OSInfo.bash_path()
Fails when there is no
windows_subsytem
Changelog: Bugfix: Fixed
OSInfo.bash_path()
when there is nowindows_subsystem
.