You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ X] I have read and understand the CONTRIBUTING guide
[ X] I looked for duplicate issues before submitting this one
Description
oh-my-posh v3 doesn't support Raspbian with PowerShell, it tries launching an inappropriate binary, reusing in an error message.
Environment
Oh my Posh version: 3.134.0
Theme: jandedobbeleer
Operating System: Raspbian Stretch
Shell: PowerShell 7.1.3
Terminal: MobaXterm
Steps to Reproduce
Install oh-my-posh 3.134.0 using Install-Module oh-my-posh -Force -AllowPrerelease
Run Set-PoshPrompt -theme jandedobbeleer
Expected behavior:
The expected prompt should be displayed
Actual behavior:
The following error message is displayed:
ResourceUnavailable: /home/pi/.local/share/powershell/Modules/oh-my-posh/3.134.0/oh-my-posh.psm1:60
Line |
60 | Invoke-Expression (& $poshCommand --init --shell=pwsh --config="$ …
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Program 'posh-linux-amd64' failed to run: Exec format errorAt
| /home/pi/.local/share/powershell/Modules/oh-my-posh/3.134.0/oh-my-posh.psm1:60 char:24 + … ke-Expression (& $poshCommand
| --init --shell=pwsh --config="$config") + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.
Here's a fix, I'll submit a PR:
diff --git a/packages/powershell/oh-my-posh/oh-my-posh.psm1 b/packages/powershell/oh-my-posh/oh-my-posh.psm1
index ad90dae..bf3be81 100644--- a/packages/powershell/oh-my-posh/oh-my-posh.psm1
+++ b/packages/powershell/oh-my-posh/oh-my-posh.psm1
@@ -10,7+10,7 @@ function Get-PoshCommand {
if ($IsLinux) {
# this is rather hacky but there's no other way for the time being$arch= uname -m
-if ($arch-eq'aarch64') {
+if (($arch-eq'aarch64') -or ($arch-eq'armv7l')) {
return"$PSScriptRoot/bin/posh-linux-arm"
}
return"$PSScriptRoot/bin/posh-linux-amd64"
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity (i.e. last half year) after it was closed. It helps our maintainers focus on the active issues.
If you have found a problem that seems similar, please open a discussion first, complete the body with all the details necessary to reproduce, and mention this issue as reference.
Prerequisites
CONTRIBUTING
guideDescription
oh-my-posh v3 doesn't support Raspbian with PowerShell, it tries launching an inappropriate binary, reusing in an error message.
Environment
Steps to Reproduce
Install-Module oh-my-posh -Force -AllowPrerelease
Set-PoshPrompt -theme jandedobbeleer
Expected behavior:
The expected prompt should be displayed
Actual behavior:
The following error message is displayed:
Here's a fix, I'll submit a PR:
The text was updated successfully, but these errors were encountered: