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: native uninstall command fails due to current link broken, stepping over: The file or directory is not a reparse point. (os error 4390) #1284

Open
kr5ture opened this issue Mar 6, 2024 · 0 comments
Labels

Comments

@kr5ture
Copy link
Contributor

kr5ture commented Mar 6, 2024

Bug report
uninstall function is not working properly:

  • I have installed a package:
    $ sdk install java 21.0.2-tem
    
    Downloading: java 21.0.2-tem
    
    In progress...
    
    ##################################################################################################################################### 100.0%
    
    Installing: java 21.0.2-tem
    Done installing!
    
    Setting java 21.0.2-tem as default.
    
  • It is installed:
    $ ls -la .sdkman/candidates/java/
    total 8
    drwxr-xr-x 1 some-user Brak 0 Mar  6 22:54 .
    drwxr-xr-x 1 some-user Brak 0 Mar  6 22:53 ..
    drwxr-xr-x 1 some-user Brak 0 Jan 17 06:15 21.0.2-tem
    drwxr-xr-x 1 some-user Brak 0 Mar  6 22:54 current
    
  • Then uninstalling fails:
    $ sdk uninstall java 21.0.2-tem
    current link broken, stepping over: The file or directory is not a reparse point. (os error 4390)
    removed java 21.0.2-tem.
    
    $ ls -la .sdkman/candidates/java/
    total 4
    drwxr-xr-x 1 some-user Brak 0 Mar  6 22:54 .
    drwxr-xr-x 1 some-user Brak 0 Mar  6 22:53 ..
    drwxr-xr-x 1 some-user Brak 0 Mar  6 22:54 current
    

💡 It seems only native uninstall implementation is affected - when I removed .sdkman/libexec/uninstall.exe then uninstall command works just fine.

Error message seems to be produced by this error handler: https://github.com/sdkman/sdkman-cli-native/blob/master/src/bin/uninstall/main.rs#L43-L69

To reproduce

⬆️

System info

  • OS (e.g. Windows, Linux, Mac, Cygwin, WSL, etc.) and version: Windows 10 / MSYS_NT-10.0-19045 version 3.4.10.x86_64 (runneradmin@fv-az1258-409) (gcc version 13.2.0 (GCC) ) 2024-02-10 08:39 UTC
  • Shell and version (e.g. bash --version/zsh --version): GNU bash, version 5.2.26(1)-release (x86_64-pc-msys)
  • The output of sdk version:
    SDKMAN!
    script: 5.18.2
    native: 0.4.6
    
@kr5ture kr5ture added the bug label Mar 6, 2024
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

1 participant