mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Correct case of $PSHOME special variable
This commit is contained in:
+1
-1
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user