dotnet / install-scripts

MIT License
128 stars 68 forks source link

Support for dotnet-install.ps1 on Linux #417

Open gdbarron opened 7 months ago

gdbarron commented 7 months ago

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 ......
baronfel commented 7 months ago

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.