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

[Linux] curl.exe doesn't exist #22

Closed
FederAndInk opened this issue Jul 25, 2022 · 13 comments · Fixed by #25
Closed

[Linux] curl.exe doesn't exist #22

FederAndInk opened this issue Jul 25, 2022 · 13 comments · Fixed by #25
Labels
bug Something isn't working

Comments

@FederAndInk
Copy link
Contributor

Modpack Version

none

Describe your issue.

curl.exe won't work on Linux, I think you'll need a variable set to curl.exe on win and to curl on Linux

btw, I think you need to change your issue template for this repo ^^

Crash Report

No response

Latest Log

No response

Have you modified the modpack?

No

User Modifications

No response

Did the issue happen in singleplayer or on a server?

Both

Discord Username

No response

@FederAndInk FederAndInk added the bug Something isn't working label Jul 25, 2022
@NielsPilgaard
Copy link
Collaborator

Thanks for the report, I'll get that fixed (eventually 😅)

@FederAndInk
Copy link
Contributor Author

thanks,
I would have done it, but I don't know powershell, I've seen there is $IsWindows $IsLinux variables though.
Python could have been more widespread and Linux friendly :p

@FederAndInk
Copy link
Contributor Author

Python could have been more widespread and Linux friendly :p

But great project anyways 😄

@NielsPilgaard
Copy link
Collaborator

I removed those variables 😓

@FederAndInk
Copy link
Contributor Author

what do you mean?
shouldn't they be built-in?

@FederAndInk
Copy link
Contributor Author

this is what I get out of the box:

PS /home/nihil> Write-Host $IsLinux
True
PS /home/nihil> Write-Host $IsWindows
False
PS /home/nihil> Write-Host $IsMacos
False

@NielsPilgaard
Copy link
Collaborator

I'm afraid those variables only exist in Powershell Core, not the windows native version, so I can't rely on them :/

@FederAndInk
Copy link
Contributor Author

well then, you could try to see if the variable is defined and do:

if IsWindows not defined or $IsWindows
  use curl.exe
else
  use curl

@FederAndInk
Copy link
Contributor Author

FederAndInk commented Jul 31, 2022

found this otherwise: https://devblogs.microsoft.com/scripting/powertip-determine-your-version-of-powershell-and-host-operating-system/

using $PSVersionTable

Scripting Blog
Identify your PowerShell environment by making use of built-in PowerShell variables.

NielsPilgaard added a commit that referenced this issue Aug 2, 2022
This change makes the assumption that any non-Windows OS is using Powershell Core, which does not have the silly `curl` alias for `Invoke-Webrequest`, making this change safe.
Fixes #22
@NielsPilgaard
Copy link
Collaborator

NielsPilgaard commented Aug 2, 2022

Should be all fixed, thanks for the helpful pointers :)
Edit: Would you mind checking if the fix actually works? I only have a Windows laptop at my disposal

@FederAndInk
Copy link
Contributor Author

no problem, thank you for the fix.
btw, isn't possible to store curl or curl.exe in a variable like in bash? and use it as a command

@NielsPilgaard
Copy link
Collaborator

Oh, it actually is. That simplifies this greatly.

@NielsPilgaard
Copy link
Collaborator

NielsPilgaard commented Aug 2, 2022

Changed, thanks :D https://github.com/EnigmaticaModpacks/ModpackUploader/releases/tag/2.3.2

GitHub
What's Changed

simplify how the curl command is determined by @NielsPilgaard in #26

Full Changelog: 2.3.0...2.3.2

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

Successfully merging a pull request may close this issue.

2 participants