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

Cygwin forward slashes #176

Closed

Conversation

Doxterpepper
Copy link
Contributor

#153
@sharkdp, I was messing around with this and figured I'd go ahead and open a PR, hope you don't mind. This change adds a check for if the HOME environment variable is present at run time on windows builds. The HOME environment variable is not available in cmd so it servers as a way to differentiate between the two environments and print the appropriate slashes accordingly.

@sharkdp
Copy link
Owner

sharkdp commented Nov 22, 2017

I was messing around with this and figured I'd go ahead and open a PR, hope you don't mind.

Absolutely not. Thank you very much for your contribution.


Before going forward with this, I'd like to have the questions in #153 answered (also the ones by @ghuls), as it's not clear to me that we actually need this.

Concerning the code changes, I'm not too keen about having so many #[cfg(...)] special cases for different OSes, but maybe that's just me. Also, the check for the $HOME variable does seem a little bit fragile. Doesn't cygwin provide something like $CYGWIN_VERSION or similar?

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.

2 participants