-
Notifications
You must be signed in to change notification settings - Fork 15
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
not a valid path: /c/Users/chris/.sdkman\var\candidates #258
Comments
Hi @xpusostomos, our problem is that Cygwin doesn't handle paths properly, and Rust does not support that. We now build proper Windows binaries that behave in the way that a Windows binary should, but Cygwin expects windows binaries to behave as Unix. This problem will only get worse as we port more across to Rust. I know that GitBash does the right thing and works well with SDKMAN on Windows. Alternatively, you could also try WSL2. |
@marc0der having a unix shell call a windows program, is hardly natural, and I was going to respond to you along the lines of, would it kill you to use however.... when I try sdk on windows right now (doing an upgrade on sdk to be sure), it all works again, including "sdk default groovy blah"... so I presume someone has fixed it... At the end of the day, bash, whether the cygwin version or not, works with the paths you give it. Cygwin works perfectly happy with C:/ as the beginning of a path, just the same as windows does. So as long as you don't contaminate your variables with a cygwinism, then you don't even need cygpath.. not that cygpath is that hard. |
We won't be sending anything to a Rust program from bash. Rust reads and builds its paths natively.
I assume that your |
@marc0der libexec has 5 .exe programs in there. The above error I reported looks to me like a crash inside a rust program to me. If you never pass a path into rust from bash, I don't understand the complaints about cygwin paths being an issue... and at this point in history, they don't appear to be an issue. However the above error seems to indicate a cygwin path got into rust. cygwin is a project that probably has tens of thousands of man years of development put into it. It should not be onerous to make the... apparently minimal... effort to keep it working. |
I was using sdkman for many years with cygwin, it was great. Some months back, sdkman broke it, for no good reason I could see. But I was excited recently to try it again, and it 95% works! yay! Because I was lost without it.
However, this command gives an error:
$ sdk default groovy 4.0.19
thread 'main' panicked at src\lib.rs:38:13:
not a valid path: /c/Users/chris/.sdkman\var\candidates
note: run with
RUST_BACKTRACE=1
environment variable to display a backtraceThe text was updated successfully, but these errors were encountered: