From c77297c86755c13d5b6a13c091baca0ab0f2adf9 Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Thu, 11 Mar 2021 19:14:41 +0100 Subject: [PATCH] feat(pwsh): add linx arm binary resolves #512 --- packages/powershell/oh-my-posh/deploy.ps1 | 2 +- packages/powershell/oh-my-posh/oh-my-posh.psm1 | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/powershell/oh-my-posh/deploy.ps1 b/packages/powershell/oh-my-posh/deploy.ps1 index ca624f7b..cf1754bf 100644 --- a/packages/powershell/oh-my-posh/deploy.ps1 +++ b/packages/powershell/oh-my-posh/deploy.ps1 @@ -20,7 +20,7 @@ Param Copy-Item -Path "../../../themes" -Destination "./themes" -Recurse # fetch all the binaries from the version's GitHub release New-Item -Path "./" -Name "bin" -ItemType "directory" -"posh-windows-amd64.exe", "posh-windows-386.exe", "posh-darwin-amd64", "posh-linux-amd64" | ForEach-Object -Process { +"posh-windows-amd64.exe", "posh-windows-386.exe", "posh-darwin-amd64", "posh-linux-amd64", "posh-linux-arm" | ForEach-Object -Process { $download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$BinVersion/$_" Invoke-WebRequest $download -Out "./bin/$_" } diff --git a/packages/powershell/oh-my-posh/oh-my-posh.psm1 b/packages/powershell/oh-my-posh/oh-my-posh.psm1 index 1b559b66..3ffaf463 100644 --- a/packages/powershell/oh-my-posh/oh-my-posh.psm1 +++ b/packages/powershell/oh-my-posh/oh-my-posh.psm1 @@ -8,6 +8,11 @@ function Get-PoshCommand { return "$PSScriptRoot/bin/posh-darwin-amd64" } if ($IsLinux) { + # this is rather hacky but there's no other way for the time being + $arch = uname -m + if ($arch -eq 'aarch64') { + return "$PSScriptRoot/bin/posh-linux-arm" + } return "$PSScriptRoot/bin/posh-linux-amd64" } if ([Environment]::Is64BitOperatingSystem) {