PowerShell / PowerShell/PSResourceGet
Update-PSScriptFileInfo modifies Description even when -Description parameter is not used
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
When Update-PSScriptInfo is used to change script metadata, the Description property of Comment-based help is modified event when Description parameter is not used.
The sample script to test the problem: Update-PSInfo.ps1
Expected behavior
Both the placement of Description property is changed and also, the formatting of content is changed.
Expected behavior
PS> Get-Content Update-PSInfo.ps1
<#PSScriptInfo
.VERSION 1.0.0
. . .
#>
<#
.SYNOPSIS
A short synopsis
.DESCRIPTION
A longer description.
Second paragraph
. . .
PS> Update-PSScriptFileInfo -Path Update-PSInfo.ps1 -Version 1.1.0
PS> Get-Content Update-PSInfo.ps1
<#PSScriptInfo
.VERSION 1.1.0
. . .
#>
<#
.SYNOPSIS
A short synopsis
.DESCRIPTION
A longer description.
Second paragraph
. . .
Actual behavior
PS> Update-PSScriptFileInfo -Path Update-PSInfo.ps1 -Version 1.1.0
PS> Get-Content Update-PSInfo.ps1
<#PSScriptInfo
.VERSION 1.1.0
. . .
#>
<#
.DESCRIPTION
A longer description.
Second paragraph
.SYNOPSIS
A short synopsis
. . .
Error details
Environment data
- PowerShell version: 5.1, 7.5.1
- PSResourceGet version: 1.1.1
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
Start with the linked Update-PSInfo.ps1 reproduction and the Update-PSScriptFileInfo entry point in PSResourceGet. Compare the expected and actual output when only -Version is supplied, then run the relevant existing tests if available. Done means the description remains in place with its paragraph formatting unchanged when -Description is omitted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, powershell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100