Open
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
Steps to reproduce
Get-InstalledPSResource -ErrorAction Ignore -Path
throws if path contains no directories.
Reproduce:
# Make up a temp path
$TempPath = [string] [System.IO.Path]::Combine($env:TEMP,[datetime]::Now.ToString('yyyyMMddHHmmss'))
# Create said temp path
$null = [System.IO.Directory]::CreateDirectory($TempPath)
# Get installed modules from it
Get-InstalledPSResource -ErrorAction Ignore -Path $TempPath
Expected behavior
-ErrorAction Ignore
should not throw
Actual behavior
It throws
Error details
Error cannot find expected subdirectories in provided path: <some_path>
Environment data
* Windows 11 24H2 x64
* PowerShell v7.5.0
* PSResourceGet v1.1.1
Visuals
No response