File tree Expand file tree Collapse file tree 1 file changed +3
-9
lines changed
packages/powershell/go-my-posh Expand file tree Collapse file tree 1 file changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -30,23 +30,17 @@ if ($IsWindows) {
3030
3131function Set-PoshPrompt {
3232 param (
33- [Parameter (Mandatory = $true )]
33+ [Parameter (Mandatory = $false )]
3434 [string ]
3535 $Theme
3636 )
3737
38- $themePath = " "
3938 if (Test-Path " $PSScriptRoot /Themes/$Theme .json" ) {
40- $themePath = " $PSScriptRoot /Themes/$Theme .json"
39+ $global :PoshSettings .Theme = " $PSScriptRoot /Themes/$Theme .json"
4140 }
4241 elseif (Test-Path $Theme ) {
43- $themePath = $Theme
42+ $global :PoshSettings .Theme = $Theme
4443 }
45- else {
46- Write-Error - Message " Unable to locate theme, please verify the name and/or location"
47- return
48- }
49- $global :PoshSettings.Theme = $themePath
5044
5145 [ScriptBlock ]$Prompt = {
5246 $realLASTEXITCODE = $global :LASTEXITCODE
You can’t perform that action at this time.
0 commit comments