Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ private string GetHelpFile(string helpFile, CmdletInfo cmdletInfo)
searchPaths.Add(HelpUtils.GetUserHomeHelpSearchPath());
searchPaths.Add(mshSnapInInfo.ApplicationBase);
}
else if (cmdletInfo.Module != null && !string.IsNullOrEmpty(cmdletInfo.Module.Path))
else if (cmdletInfo.Module != null && !string.IsNullOrEmpty(cmdletInfo.Module.Path) && !string.IsNullOrEmpty(cmdletInfo.Module.ModuleBase))
{
searchPaths.Add(HelpUtils.GetModuleBaseForUserHelp(cmdletInfo.Module.ModuleBase, cmdletInfo.Module.Name));
searchPaths.Add(cmdletInfo.Module.ModuleBase);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
# NOTE: ensure the fileNameBase parameter is unique for each test case; it is used to generate a unique error and done file name.
# The following test does not consistently work on windows
# @{cmdline = "Get-Item $protectedPath2 -ErrorAction Stop"; expectedError = "ItemExistsUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetItemCommand"}
# @{cmdline = "New-Item -Type File -Path $newItemPath -ErrorAction Stop"; expectedError = "NewItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.NewItemCommand"}
@{cmdline = "Get-ChildItem $protectedPath -ErrorAction Stop"; expectedError = "DirUnauthorizedAccessError,Microsoft.PowerShell.Commands.GetChildItemCommand"}
@{cmdline = "New-Item -Type File -Path $newItemPath -ErrorAction Stop"; expectedError = "NewItemUnauthorizedAccessError,Microsoft.PowerShell.Commands.NewItemCommand"}
@{cmdline = "Rename-Item -Path $protectedPath -NewName bar -ErrorAction Stop"; expectedError = "RenameItemIOError,Microsoft.PowerShell.Commands.RenameItemCommand"},
@{cmdline = "Move-Item -Path $protectedPath -Destination bar -ErrorAction Stop"; expectedError = "MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand"}
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ Describe "Environment-Variables" -Tags "CI" {
It "Should have the correct HOME" {
if ($IsWindows)
{
$expected = "\Users"
Split-Path $ENV:HOMEPATH -Parent | Should -Be $expected
# \Windows\System32 is found as $env:HOMEPATH for temporary profiles
$expected = "\Users", "\Windows"
Split-Path $ENV:HOMEPATH -Parent | Should -BeIn $expected
}
else
{
Expand Down