PowerShell / PowerShell/PSResourceGet
Save-PSResource & Install-PSResource do not include empty files & folders
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 576
- Forks
- 114
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 7
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
Tested against a fileshare based repository
Empty folders and empty files - and empty folders containing nothing but empty files - are not installed / deployed.
Manually unwrapping the .nupkg files proves they were correctly included in the publishing and only go AWOL on install/deployment.
If a module is then built on a template that also includes empty folders, where files within are dynamically included at import (if any), and published, it will generate an error in import, as it tries to enumerate a folder that does not exist.
Expected behavior
Install-Module ContosoTools -Repository local
Import-Module ContosoTools
#-> No errors
Actual behavior
Install-Module ContosoTools -Repository local
Import-Module ContosoTools
# Error: Get-ChildItem: Cannot find path '<documents>\PowerShell\Modules\ContosoTools\1.0.0\internal\'
Error details
Environment data
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Binary 1.1.1 Microsoft.PowerShell.PSResourceGet {Compress-PSResource, Find-PSResource, Get-Install…
Name Value
---- -----
PSVersion 7.5.1
PSEdition Core
GitCommitId 7.5.1
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Visuals
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with a fileshare repository using Save-PSResource and Install-PSResource, then verify the published .nupkg contents against the installed module. Trace the install or deployment path for empty files and folders. Done means empty folders and files survive installation and Import-Module ContosoTools no longer reports a missing internal path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100