Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Update-PSScriptFileInfo modifies Description even when -Description parameter is not used

Đang mở
#1,834 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, powershell
Lĩnh vực
cli, tooling

Hướng nghiên cứu

Bắt đầu với bản tái hiện Update-PSInfo.ps1 được liên kết và entry point Update-PSScriptFileInfo trong PSResourceGet. So sánh đầu ra dự kiến với đầu ra thực tế khi chỉ cung cấp -Version, sau đó chạy các bài kiểm thử hiện có liên quan nếu có. Được xem là hoàn tất khi phần mô tả vẫn giữ nguyên vị trí và định dạng đoạn văn không thay đổi khi -Description bị bỏ qua.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
577
Fork
114
Merge trung bình
23 giờ 17 phút
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSResourceGet

Tất cả issue của PowerShell/PSResourceGet

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.