Skip to content

Fix command syntax order in update command examples#619

Merged
AmelBawa-msft merged 2 commits intomicrosoft:mainfrom
thejjw:main
Jul 25, 2025
Merged

Fix command syntax order in update command examples#619
AmelBawa-msft merged 2 commits intomicrosoft:mainfrom
thejjw:main

Conversation

@thejjw
Copy link
Copy Markdown
Contributor

@thejjw thejjw commented Jul 25, 2025


Hello,
I noticed that the wingetcreate update command will not accept package id in the end of command despite provided example in its usage output.
See:

PS C:\temp> wingetcreate update --urls 'https://download.getupnote.com/app/UpNote%20Setup.exe|x64' UpNotePte.Ltd.UpNote
Windows Package Manager Manifest Creator v1.10.2.0
Copyright (c) Microsoft Corporation. All rights reserved.

The manifest creation command line utility generates manifest for submitting
apps to the Windows Package Manager repo.

The following commands are available:

USAGE:
Search for an existing manifest and update the installer url and version:
  wingetcreate.exe update --urls <InstallerUrl1> <InstallerUrl2> --version <Version>
  <PackageIdentifier>
Save and publish updated manifest:
  wingetcreate.exe update --out <OutputDirectory> --token <GitHubPersonalAccessToken> --version
  <Version> <PackageIdentifier>
Override the architecture of an installer:
  wingetcreate.exe update --urls '<InstallerUrl1>|<InstallerArchitecture>' --version <Version>
  <PackageIdentifier>
Override the scope of an installer:
  wingetcreate.exe update --urls '<InstallerUrl1>|<InstallerScope>' --version <Version>
  <PackageIdentifier>
Update an existing manifest and submit PR to GitHub:
  wingetcreate.exe update --submit --token <GitHubPersonalAccessToken> --urls <InstallerUrl1>
  <InstallerUrl2> --version <Version> <PackageIdentifier>

  -v, --version                 Version to be used when updating the package version field.
  -d, --display-version         Version to be used when updating the display version field. Version
                                provided in the installer URL arguments will take precedence over
                                this value.
  --release-notes-url           URL to be used when updating the release notes url field.
  --release-date                Date to be used when updating the release date field. Expected
                                format is "YYYY-MM-DD".
  -o, --out                     The output directory to store the generated manifests locally.
  -p, --prtitle                 The title of the pull request submitted to GitHub.
  -s, --submit                  Boolean value for submitting to the Windows Package Manager repo. If
                                true, updated manifest will be submitted directly using the provided
                                GitHub Token. Default is false.
  -r, --replace                 Boolean value for replacing an existing manifest from the Windows
                                Package Manager repo. Optionally provide a version or else the
                                latest version will be replaced. Default is false.
  -i, --interactive             Boolean value for making the update command interactive. If true,
                                the tool will prompt the user for input. Default is false.
  -f, --format                  Output format of the manifest. Default is "yaml".
  -t, --token                   GitHub personal access token used for direct submission to the
                                Windows Package Manager repo. If no token is provided, tool will
                                prompt for GitHub login credentials.

                                Warning: Using this argument may result in the token being logged.
                                Consider an alternative approach https://aka.ms/winget-create-token.
  -u, --urls                    Installer Url(s) used to extract relevant metadata for generating a
                                manifest
  PackageIdentifier (pos. 0)    Required. Package identifier used to lookup the existing manifest on
                                the Windows Package Manager repo. Id is case-sensitive.
  ReplaceVersion (pos. 1)       Optional. Package version used in conjunction with the replace
                                argument to replace an older version of the manifest from the
                                Windows Package Manager repo.

More help can be found at: https://aka.ms/winget-create
Privacy statement: https://aka.ms/winget-create-privacy

 A required value not bound to option name is missing.
PS C:\temp> wingetcreate update UpNotePte.Ltd.UpNote --urls 'https://download.getupnote.com/app/UpNote%20Setup.exe|x64' --submit
Retrieving latest manifest for UpNotePte.Ltd.UpNote
...

Manifest saved to C:\temp\manifests\u\UpNotePte\Ltd\UpNote\9.11.11

Manifest validation succeeded: True

Submitting pull request for manifest...

Pull request can be found here: https://github.com/microsoft/winget-pkgs/pull/xxx

I looked up the update.md document for clarification and in fact the update.md listed id to come as first parameter of winget update (wingetcreate.exe update <id> [-u <urls>] [-v <version>] [-s] [-t <token>] [-o <output directory>] [-p <pull request title>] [-r] [<replace version>] [-d <display version>] [--release-date <release date> ] [--release-notes-url <release notes url>] [--format <format>] [--interactive] [--help]) but usage examples section in the below diverges from that practice.

I have corrected the syntax order in the update command examples for clarity and consistency.

Please review and revise as necessary.

Thanks.

Microsoft Reviewers: Open in CodeFlow

@mdanish-kh
Copy link
Copy Markdown
Contributor

mdanish-kh commented Jul 25, 2025

Hello, I noticed that the wingetcreate update command will not accept package id in the end of command despite provided example in its usage output. See:

Related to:

See comment #182 (comment)

This is a known issue with using the --urls flag. Since --urls accepts multiple values, it thinks that the PackageId you provided is also a URL & then errors out by noticing the PackageIdentifier (a required value) was not specified. I'm not sure if the behavior of the CLI parser is necessarily "wrong" here, but I definitely feel we should try to make the user experience more friendly here. The PackageId can be specified last if you do something like wingetcreate update --urls 'https://download.getupnote.com/app/UpNote%20Setup.exe|x64' --version 1.2 UpNotePte.Ltd.UpNote

Though I don't mind the change in this PR if that helps users fall in the pit of success by always specifying it first

Copy link
Copy Markdown
Contributor

@mdanish-kh mdanish-kh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AmelBawa-msft
Copy link
Copy Markdown
Contributor

@thejjw, thank you for the changes ✨ Once the branch is updated from the main branch, I will merge it 😊

@AmelBawa-msft AmelBawa-msft merged commit 4ad697e into microsoft:main Jul 25, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants