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

binaries from zip download lack executable flags #799

Closed
hohwille opened this issue Nov 23, 2024 · 0 comments · Fixed by #835 or #884
Closed

binaries from zip download lack executable flags #799

hohwille opened this issue Nov 23, 2024 · 0 comments · Fixed by #835 or #884
Labels
bug Something isn't working macOS specific for Apple MacOS terraform Terraform infrastructure as code tool unpack logic to unpack archives (tar, zip, tgz, zbz2, msi, dmg, etc.)

Comments

@hohwille
Copy link
Member

hohwille commented Nov 23, 2024

Expected behavior

As a IDEasy user, I want to install and run terraform via ide command so that I can easily use it.

Actual behavior

$ ide terraform
Trying to download terraform-1.9.8-mac-x64.zip from https://releases.hashicorp.com/terraform/1.9.8/terraform_1.9.8_darwin_amd64.zip
Downloading 100% │███████████████████████████████████████████████████████████████████████████████████████│ 26/26MiB (0:00:00 / 0:00:00) ?MiB/s
Checksum be591e8c59c49d0cfbc7664d24910a4b43840b89d0a4bbca662149bbf0397e91 is correct.
Unpacking 100% │█████████████████████████████████████████████████████████████████████████████████████████│ 26/26MiB (0:00:00 / 0:00:00) ?MiB/s
Step 'ide (terraform)' failed: java.lang.IllegalStateException: Running command '/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform' with arguments '-install-autocomplete' failed: Cannot run program "/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform": error=13, Permission denied
 Step 'Install terraform (*)' failed: java.lang.IllegalStateException: Running command '/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform' with arguments '-install-autocomplete' failed: Cannot run program "/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform": error=13, Permission denied
2 step(s) failed out of 3 steps.
An unexpected error occurred!
We are sorry for the inconvenience.
Please check the error below, resolve it and try again.
If the error is not on your end (network connectivity, lack of permissions, etc.) please file a bug:
https://github.com/devonfw/IDEasy/issues/new?assignees=&labels=bug&projects=&template=bug.md&title=IllegalStateException%3A+Running+command+%27%2FUsers%2Fhohwille%2Fprojects%2F_ide%2Fsoftware%2Fdefault%2Fterraform%2Fterraform%2F1.9.8%2Fterraform%27+with+arguments+%27-install-autocomplete%27+failed%3A+Cannot+run+program+%22%2FUsers%2Fhohwille%2Fprojects%2F_ide%2Fsoftware%2Fdefault%2Fterraform%2Fterraform%2F1.9.8%2Fterraform%22%3A+error%3D13%2C+Permission+denied
java.lang.IllegalStateException: Running command '/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform' with arguments '-install-autocomplete' failed: Cannot run program "/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform": error=13, Permission denied
	at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:204)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:169)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:152)
	at com.devonfw.tools.ide.tool.terraform.Terraform.postInstall(Terraform.java:30)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.postInstall(LocalToolCommandlet.java:128)
	at com.devonfw.tools.ide.tool.LocalToolCommandlet.install(LocalToolCommandlet.java:103)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:166)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:152)
	at com.devonfw.tools.ide.tool.ToolCommandlet.runTool(ToolCommandlet.java:139)
	at com.devonfw.tools.ide.tool.ToolCommandlet.run(ToolCommandlet.java:130)
	at com.devonfw.tools.ide.context.AbstractIdeContext.applyAndRun(AbstractIdeContext.java:860)
	at com.devonfw.tools.ide.context.AbstractIdeContext.run(AbstractIdeContext.java:767)
	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:29)
	at [email protected]/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH)
Caused by: java.io.IOException: Cannot run program "/Users/hohwille/projects/_ide/software/default/terraform/terraform/1.9.8/terraform": error=13, Permission denied
	at [email protected]/java.lang.ProcessBuilder.start(ProcessBuilder.java:1170)
	at [email protected]/java.lang.ProcessBuilder.start(ProcessBuilder.java:1089)
	at com.devonfw.tools.ide.process.ProcessContextImpl.run(ProcessContextImpl.java:173)
	... 15 more
Caused by: java.io.IOException: error=13, Permission denied
	at [email protected]/java.lang.ProcessImpl.forkAndExec(Native Method)
	at [email protected]/java.lang.ProcessImpl.<init>(ProcessImpl.java:295)
	at [email protected]/java.lang.ProcessImpl.start(ProcessImpl.java:225)
	at [email protected]/java.lang.ProcessBuilder.start(ProcessBuilder.java:1126)
	... 17 more

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

  1. ide terraform

Related/Dependent Issues

Same bug also exists for gradle.
Update: same error also for ide gh -v

Comments/Hints:

If we download tools as ZIP on Linux or Mac, we must call chmod +x on the tool binary after unpacking.

Affected version:

  • OS: Mac
  • 2024.12.001-beta-SNAPSHOT
@hohwille hohwille added bug Something isn't working macOS specific for Apple MacOS terraform Terraform infrastructure as code tool labels Nov 23, 2024
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Nov 23, 2024
@hohwille hohwille changed the title terraform and gradle not working on Mac (zip lacks executable flagss) terraform and gradle not working on Mac (zip lacks executable flags) Nov 23, 2024
@hohwille hohwille changed the title terraform and gradle not working on Mac (zip lacks executable flags) binaries from zip download lack executable flags Dec 3, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 3, 2024
@hohwille hohwille added the unpack logic to unpack archives (tar, zip, tgz, zbz2, msi, dmg, etc.) label Dec 3, 2024
@hohwille hohwille added this to the release:2024.12.001 milestone Dec 3, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 3, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 5, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 5, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 5, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 5, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 5, 2024
hohwille added a commit that referenced this issue Dec 5, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 6, 2024
refactoring of progressbar and changing expected result of IJ and AStudio plugin
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in IDEasy board Dec 9, 2024
hohwille added a commit to hohwille/IDEasy that referenced this issue Dec 10, 2024
@hohwille hohwille linked a pull request Dec 10, 2024 that will close this issue
hohwille added a commit that referenced this issue Dec 10, 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 macOS specific for Apple MacOS terraform Terraform infrastructure as code tool unpack logic to unpack archives (tar, zip, tgz, zbz2, msi, dmg, etc.)
Projects
Status: ✅ Done
1 participant