Skip to content
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

MVC to fix path issues on Windows #771

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

3tilley
Copy link
Contributor

@3tilley 3tilley commented Oct 26, 2023

I'm a Windows user who mainly uses bash. I can see there are some rough edges on Windows, and it's noted elsewhere that the maintainers aren't Windows users themselves (which is understandable). I'm hoping to try and work through some of the rough edges to do with path handling, especially with bash.

I can see #588, #460, #78, #98, #99 which should mostly be fixed by something similar to the below. Have you got any others?

I'll have to do some work to formally detect cygwin / bash on windows, but I'll hardcode it locally for myself and run it for a while to see how it goes.

I wonder if the more elegant solution is to use / for paths everywhere instead of quoting, but that will bring up its own issues. I'll see how it works with the quoting for a while and then think about it a bit more.

@@ -409,5 +409,10 @@ mod execution_builder_test {
}

fn path_to_string<P: AsRef<Path>>(path: P) -> String {
path.as_ref().to_string_lossy().to_string()
let is_bash_on_windows = true;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you forget something here ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, deliberately so! I have hardcoded it locally to allow me to test broot in Windows bash, and when I've done some testing I'll implement the best method.

This is more of a CTA for any similar bugs that I can fix in one shot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants