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
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