Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix singleton check + docs for show command #441

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ choco install wingetcreate
| [New](doc/new.md) | Command for creating a new manifest from scratch |
| [Update](doc/update.md) | Command for updating an existing manifest |
| [Submit](doc/submit.md) | Command for submitting an existing PR |
| [Show](doc/show.md) | Command for displaying existing manifests |
| [Token](doc/token.md) | Command for managing cached GitHub personal access tokens |
| [Settings](doc/settings.md) | Command for editing the settings file configurations |
| [Cache](doc/cache.md) | Command for managing downloaded installers stored in cache
Expand Down
12 changes: 6 additions & 6 deletions src/WingetCreateCLI/Commands/ShowCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -176,17 +176,17 @@ private static void DisplaySingletonManifest(SingletonManifest singletonManifest

private void ParseArgumentsAndShowManifest(Manifests manifests)
{
bool showAll = !this.ShowInstallerManifest && !this.ShowDefaultLocaleManifest && !this.ShowLocaleManifests && !this.ShowVersionManifest;

if (showAll)
if (manifests.SingletonManifest != null)
{
ShowAllManifests(manifests);
DisplaySingletonManifest(manifests.SingletonManifest);
return;
}

if (manifests.SingletonManifest != null)
bool showAll = !this.ShowInstallerManifest && !this.ShowDefaultLocaleManifest && !this.ShowLocaleManifests && !this.ShowVersionManifest;

if (showAll)
{
DisplaySingletonManifest(manifests.SingletonManifest);
ShowAllManifests(manifests);
return;
}

Expand Down