PowerShell / PowerShell/PSResourceGet

[Save-PSResource] Add the name of the primary module into the error message when a dependency does not exist

Open
#1,340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area-Find feature_request
Dominant language
C#
Stars
576
Forks
114
Avg merge
1d 2h
Merged PRs (30d)
7

Description

Summary of the new feature / enhancement

When a dependency does not exist, the error message does not specify the name of the primary module concerned :
image

If I specify several module names, I don't know which primary module is causing the problem.

Proposed technical implementation details (optional)

Add the name of the primary module into the error message.

Version :

ModuleType Version    Name                                ExportedCommands
---------- -------    ----                                ----------------
Binary     0.5.23     Microsoft.PowerShell.PSResourceGet  {Find-PSResource, Get-InstalledPSResource, Get-PSResourceRepository, Ge...

Key   : PSVersion
Value : 5.1.19041.3031
Name  : PSVersion


Key   : PSEdition
Value : Desktop
Name  : PSEdition


Key   : PSCompatibleVersions
Value : {1.0, 2.0, 3.0, 4.0, 5.0, 5.1.19041.3031}
Name  : PSCompatibleVersions


Key   : BuildVersion
Value : 10.0.19041.3031
Name  : BuildVersion


Key   : CLRVersion
Value : 4.0.30319.42000
Name  : CLRVersion


Key   : WSManStackVersion
Value : 3.0
Name  : WSManStackVersion


Key   : PSRemotingProtocolVersion
Value : 2.3
Name  : PSRemotingProtocolVersion


Key   : SerializationVersion
Value : 1.1.0.1
Name  : SerializationVersion

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce Save-PSResource with several module names and a missing dependency, then trace the error path that produces the dependency message. Update the relevant message so it identifies the primary module involved, and verify that the output distinguishes which module failed when multiple modules are specified.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, powershell
Domain
cli, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.