install-scripts icon indicating copy to clipboard operation
install-scripts copied to clipboard

Support for dotnet-install.ps1 on Linux

Open gdbarron opened this issue 2 years ago • 1 comments
trafficstars

Are there any plans to support the PowerShell install script on Linux? I see right now it relies on windows only Get-CimInstance to retrieve the architecture which obviously won't work. I'm wondering if this is something that's feasible, but just hasn't been done yet.

My use case is installing on Alpine Linux (in Docker) so I can use Publish-Module in my pipeline. For now, I'm using this workaround:

    - apk add bash
    - /bin/bash
    - wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh
    - chmod +x dotnet-install.sh
    - ./dotnet-install.sh
    - exit # from bash and back into PS
    - $env:PATH += ':/root/.dotnet'
    - Publish-Module -Path ......

gdbarron avatar Nov 21 '23 14:11 gdbarron

We don't currently have plans, but I agree that it makes sense to do. It would be a decent chunk of work, though - the current powershell script has hard-coded windows asset paths and would need to learn the per-OS pivots that the bash script currently has.

baronfel avatar Nov 21 '23 14:11 baronfel