pbatard / Fido

A PowerShell script to download Windows or UEFI Shell ISOs
GNU General Public License v3.0
2.41k stars 229 forks source link

winver is empty with Powershell for linux #60

Closed denis-b closed 1 year ago

denis-b commented 1 year ago

Hello, last version of Powershell for linux introduced an change, and now $winver is empty, causing Fido to end with error message

Error: This feature is not available for this version.

Workaround is simple : setting $winver = 11.0 when empty.

if  ( ! $winver)
    $winver = 11.0
}
denis-b commented 1 year ago

more exactly, [System.Environment]::OSVersion.Version.Major = 6 for Linux. this is the original problem.

pbatard commented 1 year ago

Duplicate of #58.

Unfortunately for you, I have a patch lined up where I am actually planning to detect Linux and prevent Fido from running on it altogether, because I am seeing too much trouble trying to support non-Windows platforms going forward (yes, you may argue that right now it can be made to work, but the issue is that I am not planning to validate that Fido runs on Linux or any non Windows platform, ever, and I don't want to have to run into user reports that force me to add fixes and tweaks for Linux to work).

So, Linux support is going to be out, and if you want to run Fido on Linux, I will kindly ask you to fork and support your own version.

denis-b commented 1 year ago

OK, I understand your point of view. As our project (https://www.sambaedu.org) is relying on Fido for automatic Windows Deployements, we will fork it and maintain a linux-only version that fits our needs. I hope that merging it from your upstream version will not be to much time-consuming...

pbatard commented 1 year ago

We will fork it and maintain a linux-only version that fits our needs.

Yes, I believe that this is the better way to go, because I am relying on the platform version in Fido to perform some operations, and this of course becomes completely broken on Linux, which means that some Linux users are likely to run into issues that need to be addressed specifically with a Linux version (I don't believe "forcing" the version is going to work as a long term approach), and that's precisely what I don't want to have to cater for.

Good luck with your project!