Correct case of $PSHOME special variable

This commit is contained in:
xtqqczze
2020-01-13 19:35:33 +00:00
parent 2782b73e37
commit e0d2e2aade
28 changed files with 58 additions and 58 deletions
@@ -502,7 +502,7 @@ Describe "PSModulePath changes interacting with other PowerShell processes" -Tag
Restore-ModulePath
}
It "Allows Windows PowerShell subprocesses to call `$PSHome modules still" {
It "Allows Windows PowerShell subprocesses to call `$PSHOME modules still" {
$errors = powershell.exe -Command "Get-ChildItem" 2>&1 | Where-Object { $_ -is [System.Management.Automation.ErrorRecord] }
$errors | Should -Be $null
}
@@ -1,7 +1,7 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
$powershell = Join-Path -Path $PsHome -ChildPath "pwsh"
$powershell = Join-Path -Path $PSHOME -ChildPath "pwsh"
function Wait-JobPid {
param (
@@ -700,7 +700,7 @@ namespace PowershellTestConfigNamespace
FunctionDefinitions=@(
@{
Name = "sysmodules";
ScriptBlock = 'pushd $pshome\Modules';
ScriptBlock = 'pushd $PSHOME\Modules';
Options = "AllScope";
},
@{
@@ -329,7 +329,7 @@ Describe "Remove-Module : module is readOnly | Constant" -Tags "CI" {
Describe "Remove-Module : module provides the PSDrive for current PS Session" -Tags "CI" {
It "Remove-Module : module provides the PSDrive for current PS Session" {
$module = Get-Module (Join-Path $PSHome "System.Management.Automation.dll") -ListAvailable
$module = Get-Module (Join-Path $PSHOME "System.Management.Automation.dll") -ListAvailable
{ Remove-Module $module -ErrorAction Stop } | Should -Throw -ErrorId "InvalidOperation,Microsoft.PowerShell.Commands.RemoveModuleCommand"
}
}