Skip to content

Commit

Permalink
feat(pwsh): support 32 bit systems
Browse files Browse the repository at this point in the history
resolves #479
  • Loading branch information
JanDeDobbeleer committed Mar 3, 2021
1 parent b5af1eb commit a278134
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/powershell/oh-my-posh/deploy.ps1
Expand Up @@ -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-darwin-amd64", "posh-linux-amd64" | ForEach-Object -Process {
"posh-windows-amd64.exe", "posh-windows-386.exe", "posh-darwin-amd64", "posh-linux-amd64" | ForEach-Object -Process {
$download = "https://github.com/jandedobbeleer/oh-my-posh/releases/download/v$BinVersion/$_"
Invoke-WebRequest $download -Out "./bin/$_"
}
Expand Down
10 changes: 6 additions & 4 deletions packages/powershell/oh-my-posh/oh-my-posh.psm1
Expand Up @@ -4,14 +4,16 @@
#>

function Get-PoshCommand {
$poshCommand = "$PSScriptRoot/bin/posh-windows-amd64.exe"
if ($IsMacOS) {
$poshCommand = "$PSScriptRoot/bin/posh-darwin-amd64"
return "$PSScriptRoot/bin/posh-darwin-amd64"
}
if ($IsLinux) {
$poshCommand = "$PSScriptRoot/bin/posh-linux-amd64"
return "$PSScriptRoot/bin/posh-linux-amd64"
}
return $poshCommand
if ([Environment]::Is64BitOperatingSystem) {
return "$PSScriptRoot/bin/posh-windows-amd64.exe"
}
return "$PSScriptRoot/bin/posh-windows-386.exe"
}

function Set-ExecutablePermissions {
Expand Down

0 comments on commit a278134

Please sign in to comment.