Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

PackageIdentifier - Input does not match the valid format for this field

未关闭
#600 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
csharp
领域
cli

调研方向

使用报告中的 GitHub 安装程序 URL 和 wingetcreate new 复现该流程。然后检查第 8 行所引用的 schemas/JSON/manifests/v1.6.0/manifest.singleton.1.6.0.json 正则表达式,并根据建议的 PackageIdentifier 验证每个部分的长度约束。完成的标准是确认该验证是否符合预期,或者错误是否需要更清晰的响应。

由索引模型根据 Issue 内容生成。

描述

Issue-Bug
Brief description of your issue

Hey folks,

When running wingetcreate new and supplying an installer URL from a release on GitHub, then trying to accept the parsed PackageIdentifier name OR typing it in manually, I get the following error:

"Input does not match the valid format pattern for this field".

I did some searching and I'm seeing a ton of packages that have exactly this format of <author>.<package-name>, so I'm not sure what the problem is exactly.

Image

Steps to reproduce
  1. Run wingetcreate new
  2. When prompted for InstallerUrls, enter: https://github.com/jdalley/command-palette-toggle-hdr/releases/download/v0.0.1/jdalley.ToggleHDRExtensionforCommandPalette_0.0.1.0_x64__ygjv9tpcda3x6.msix and hit enter (twice).
  3. Hit enter to accept suggested/parsed value of jdalley.ToggleHDRExtensionforCommandPalette or manually type jdalley.ToggleHDRExtensionforCommandPalette and hit enter.
  4. Get error
Expected behavior

Be allowed to proceed to the next step after entering a correct PackageIdentifier value.

Actual behavior

Not able to proceed to the next step after entering a correct PackageIdentifier value.

Environment
Windows Package Manager Manifest Creator v1.9.4.0
Copyright (c) Microsoft Corporation. All rights reserved.

Operating System: Microsoft Windows NT 10.0.26100.0
System Architecture: X64

Tried on both Warp terminal (Powershell 7.5.1) and Windows Terminal (Powershell 7.5.1)
Update

It turns out I didn't consider the property section length, and the following regex has enlightened me to the fact that the max length per-section is 32 characters. Shortening it does in fact fix this.

https://github.com/microsoft/winget-cli/blob/master/schemas/JSON/manifests/v1.6.0/manifest.singleton.1.6.0.json#L8

主要语言
C#
星标
658
派生
117
平均合并
6 小时 31 分钟
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

microsoft/winget-create 的其他 Issue

查看 microsoft/winget-create 的全部 Issue

相似的 Issue

更多 C# Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。