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

Bug: ln: failed to create symbolic link '/c/Users/Ben/.sdkman/candidates/maven/current': Operation not permitted #1250

Open
jcrben opened this issue Oct 30, 2023 · 2 comments
Labels

Comments

@jcrben
Copy link

jcrben commented Oct 30, 2023

Bug report
When running sdk install maven 3.9.5 in msys2 bash I see this:

Installing: maven 3.9.5
Done installing!

Setting maven 3.9.5 as the default.
ln: failed to create symbolic link '/c/Users/ben/.sdkman/candidates/maven/current': Operation not permitted

mvn does not work after.

I then run sdk default maven 3.9.5 and I see this:

setting maven 3.9.5 as the default version for all shells.
cannot create current symlink, fall back to copy!

mvn then works.

To reproduce

System info

Output of cmd.exe //C 'ver':

Microsoft Windows [Version 10.0.19045.3448]

Using Git for Windows bash installed via scoop with this output of bash --version

GNU bash, version 5.2.15(1)-release (x86_64-pc-msys)

The output of sdk version

script: 5.18.2
native: 0.4.3
@jcrben jcrben added the bug label Oct 30, 2023
@jcrben jcrben changed the title Bug: ln: failed to create symbolic link '/c/Users/ben/.sdkman/candidates/maven/current': Operation not permitted Bug: ln: failed to create symbolic link '/c/Users/Ben/.sdkman/candidates/maven/current': Operation not permitted Oct 30, 2023
@helpermethod
Copy link
Member

helpermethod commented Oct 30, 2023

Hi @jcrben,

have you tried

export MSYS=winsymlinks:nativestrict

?

You also need to turn on developer mode. More details here

@jcrben
Copy link
Author

jcrben commented Oct 31, 2023

@helpermethod away from my computer right now - I can try that later but it shouldn't work as I don't have Developer Mode to enable symlinks in this highly-secured corporate environment. The sdk default does what I want it to in this situation - fall back to copy.

I don't want to try to convince the security department to turn on Developer Mode as I generally don't need it for the web dev I'm doing.

I'm aware of WSL2 and do have access to that but some people I work with don't use it (and sometimes I don't use it myself).

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

No branches or pull requests

2 participants