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

UnsupportedOperationException: Files.setPosixFilePermissions on Windows #191

Closed
hohwille opened this issue Jan 26, 2024 · 0 comments · Fixed by #199
Closed

UnsupportedOperationException: Files.setPosixFilePermissions on Windows #191

hohwille opened this issue Jan 26, 2024 · 0 comments · Fixed by #199
Assignees
Labels
bug Something isn't working

Comments

@hohwille
Copy link
Member

Expected behavior

Issue #132 should be fixed with #185
It seems this feature was not tested on Windows but Java does not support this on Windows.

Actual behavior

java.lang.RuntimeException: Unexpected error during interactive auto-completion
        at com.devonfw.tools.ide.commandlet.ShellCommandlet.run(ShellCommandlet.java:111)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:789)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:753)
        at com.devonfw.tools.ide.cli.Ideasy.runOrThrow(Ideasy.java:89)
        at com.devonfw.tools.ide.cli.Ideasy.run(Ideasy.java:52)
        at com.devonfw.tools.ide.cli.Ideasy.main(Ideasy.java:28)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:279)
        at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.UnsupportedOperationException
        at java.base/java.nio.file.Files.setPosixFilePermissions(Files.java:2166)
        at com.devonfw.tools.ide.io.FileAccessImpl.unpack(FileAccessImpl.java:549)
        at com.devonfw.tools.ide.io.FileAccessImpl.untar(FileAccessImpl.java:498)
        at com.devonfw.tools.ide.tool.ToolCommandlet.extract(ToolCommandlet.java:231)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.installInRepo(LocalToolCommandlet.java:153)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.installInRepo(LocalToolCommandlet.java:117)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.installInRepo(LocalToolCommandlet.java:103)
        at com.devonfw.tools.ide.tool.LocalToolCommandlet.doInstall(LocalToolCommandlet.java:64)
        at com.devonfw.tools.ide.tool.PluginBasedCommandlet.doInstall(PluginBasedCommandlet.java:169)
        at com.devonfw.tools.ide.tool.ToolCommandlet.install(ToolCommandlet.java:171)
        at com.devonfw.tools.ide.tool.mvn.Mvn.install(Mvn.java:33)
        at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:101)
        at com.devonfw.tools.ide.tool.ToolCommandlet.run(ToolCommandlet.java:85)
        at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:789)
        at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:753)
        at com.devonfw.tools.ide.commandlet.ShellCommandlet.runCommand(ShellCommandlet.java:129)
        at com.devonfw.tools.ide.commandlet.ShellCommandlet.run(ShellCommandlet.java:92)
        ... 7 more

Steps to reproduce (bug) / Use Case of feature request (enhancement)

  1. ide install mvn (while not installed or different version is installed)

Related/Dependent Issues

Comments/Hints:

We need to check that we are not on Windows before setting the POSIX file permissions:

Files.setPosixFilePermissions(entryPath, permissions);

Affected version:

  • Windows
@hohwille hohwille added the bug Something isn't working label Jan 26, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jan 26, 2024
@hohwille hohwille added this to the release:2024.02.001 milestone Jan 26, 2024
@salimbouch salimbouch self-assigned this Feb 12, 2024
@salimbouch salimbouch moved this from 🆕 New to 👀 In review in IDEasy board Feb 12, 2024
@salimbouch salimbouch moved this from 👀 In review to 🏗 In progress in IDEasy board Feb 12, 2024
hohwille pushed a commit that referenced this issue Feb 19, 2024
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in IDEasy board Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants