mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-11-10 04:54:03 -08:00
fix(pwsh): default stack count to 0
This commit is contained in:
parent
8276799e9a
commit
9e13f1bba1
|
@ -4,7 +4,11 @@ if ($null -ne (Get-Module -Name "oh-my-posh-core")) {
|
|||
}
|
||||
|
||||
function Get-PoshStackCount {
|
||||
return (Get-Location -Stack).Count
|
||||
$locations = Get-Location -Stack
|
||||
if ($locations) {
|
||||
return $locations.Count
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
New-Module -Name "oh-my-posh-core" -ScriptBlock {
|
||||
|
|
Loading…
Reference in a new issue