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

[WINDOWS SELF-HOSTED] Issues with "extracting" non .zip files #563

Open
2 of 5 tasks
darkwolfie37 opened this issue Dec 5, 2023 · 8 comments
Open
2 of 5 tasks

[WINDOWS SELF-HOSTED] Issues with "extracting" non .zip files #563

darkwolfie37 opened this issue Dec 5, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@darkwolfie37
Copy link

darkwolfie37 commented Dec 5, 2023

Description:
when using a selfHosted runner on github The Windows machine will fail to install java due to powershell not liking non .zip files

image

Task version:
Specify the task version

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Make a fabric minecraft mod template, add a selfhosted runner to a private or public repo on github. upload the code changing the build to run on a self-hosted box, then watch as it fails.

Video of rerun showing issue: https://file.io/sk4EnEGMViVD

Expected behavior:
Installed Java and Moves on to build the fabric mod

Actual behavior:
Fails to install java due to powershell limits.

@darkwolfie37 darkwolfie37 added bug Something isn't working needs triage labels Dec 5, 2023
@IvanZosimov
Copy link
Contributor

Hi, @darkwolfie37 👋 Thanks for the issue, we will take a look at it!

@IvanZosimov
Copy link
Contributor

Hi, @darkwolfie37 it seems that to resolve you problem you need to rename downloaded JDK archive to this pattern: nameOfJdk.zip. After that the powershell will be able to extract this archive correctly. Another solution is to install a newer version of PowerShell (so called PowerShell Core).

@darkwolfie37
Copy link
Author

Hi, @darkwolfie37 it seems that to resolve you problem you need to rename downloaded JDK archive to this pattern: nameOfJdk.zip. After that the powershell will be able to extract this archive correctly. Another solution is to install a newer version of PowerShell (so called PowerShell Core).

Ok so I need to somehow edit your scripts to use powershell core or other software to make it work? Just make your script to have it download to a zip. Not my problem.

@darkwolfie37
Copy link
Author

As this seems to gone dark, I am posting this as a "bump".

@ed-erwin-tf
Copy link

ed-erwin-tf commented Feb 15, 2024

Even after installing powershell 7, the action still uses the older powershell. Powershell 7 installer seems to be designed so that it does not replace older versions, but both versions can co-exist. Both are added to the PATH but they have different exe file names.

Older Powershell.exe is here:
C:\Windows\System32\WindowsPowerShell\v1.0

Newer Powershell is called pwsh.exe and is installed here:
C:\Program Files\PowerShell\7

I'd love to get this working. Is there any way I can tell it to use pwsh.exe instead of "powershell.exe" ?

@darkwolfie37
Copy link
Author

Even after installing powershell 7, the action still uses the older powershell. Powershell 7 installer seems to be designed so that it does not replace older versions, but both versions can co-exist. Both are added to the PATH but they have different exe file names.

Older Powershell.exe is here: C:\Windows\System32\WindowsPowerShell\v1.0

Newer Powershell is called pwsh.exe and is installed here: C:\Program Files\PowerShell\7

I'd love to get this working. Is there any way I can tell it to use pwsh.exe instead of "powershell.exe" ?

I wish, but they have said that its a windows issue instead of their issue which makes them very incompetent to do this job. Like srsly, I brought a real issue to these people then they have the audacity to just Ghost this issue after now. Honestly kinda just not going to use their action anymore and build my minecraft mods manually.

@ed-erwin-tf
Copy link

Hi, @darkwolfie37 it seems that to resolve you problem you need to rename downloaded JDK archive to this pattern: nameOfJdk.zip. After that the powershell will be able to extract this archive correctly.

The downloaded file in this case already does end with the ".zip" filename. It seems that this action is re-naming it to /_work/_tmp/hashcode before trying to uncompress it.

If the action would include the ".zip" extension on the end of the hashcode filename, then I expect it would work correctly.

@darkwolfie37
Copy link
Author

Hi, @darkwolfie37 it seems that to resolve you problem you need to rename downloaded JDK archive to this pattern: nameOfJdk.zip. After that the powershell will be able to extract this archive correctly.

The downloaded file in this case already does end with the ".zip" filename. It seems that this action is re-naming it to /_work/_tmp/hashcode before trying to uncompress it.

If the action would include the ".zip" extension on the end of the hashcode filename, then I expect it would work correctly.

Agreed! This is why I made this issue as it wont open till the code renames it to a .zip. Instead I was told to rename it manually when you cant because it deletes the file so fast after failing lol

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
None yet
Development

No branches or pull requests

3 participants