Skip to content
Open
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
6 changes: 6 additions & 0 deletions doc/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ the highest priority value (and it returned only one result) then that package w
Along with the source priority change, the results from REST sources (like `msstore`) now attempt to correctly set the
match criteria that factor into the result ordering. This will prevent them from being sorted to the top automatically.

## Minor Features

### --no-progress flag

Added a new `--no-progress` command-line flag that disables all progress reporting (progress bars and spinners). This flag is universally available on all commands and takes precedence over the `visual.progressBar` setting. Useful for automation scenarios or when running WinGet in environments where progress output is undesirable.

## Bug Fixes

<!-- Nothing yet! -->
3 changes: 3 additions & 0 deletions doc/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ The `visual` settings involve visual elements that are displayed by WinGet

Style of the progress spinner and bar that WinGet displays when not specified by arguments. In addition, all options except `disabled` send [Virtual Terminal progress](https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC) updates that any supporting terminal may display visually.

> [!NOTE]
> You can also disable progress output for a single command using the `--no-progress` flag, which takes precedence over this setting.

|Value|Description|Release|
|---|---|---|
|`accent` (default)|Use the [Windows Accent color](https://support.microsoft.com/en-us/windows/change-colors-in-windows-d26ef4d6-819a-581c-1581-493cfcc005fe)|1.0|
Expand Down
10 changes: 8 additions & 2 deletions src/AppInstallerCLI.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 18
VisualStudioVersion = 18.0.11205.157
# Visual Studio Version 17
VisualStudioVersion = 17.14.36915.13 d17.14
MinimumVisualStudioVersion = 10.0.40219.1
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "AppInstallerCLIPackage", "AppInstallerCLIPackage\AppInstallerCLIPackage.wapproj", "{6AA3791A-0713-4548-A357-87A323E7AC3A}"
ProjectSection(ProjectDependencies) = postProject
Expand Down Expand Up @@ -237,6 +237,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DSC", "DSC", "{40D7CA7F-EB8
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.WinGet.UnitTests", "PowerShell\Microsoft.WinGet.UnitTests\Microsoft.WinGet.UnitTests.csproj", "{5421394F-5619-4E4B-8923-F3FB30D5EFAD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "copilot", "copilot", "{B978E358-D2BE-4FA7-A21A-6661F3744DD7}"
ProjectSection(SolutionItems) = preProject
..\.github\copilot-instructions.md = ..\.github\copilot-instructions.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Expand Down Expand Up @@ -1108,6 +1113,7 @@ Global
{E5BCFF58-7D0C-4770-ABB9-AECE1027CD94} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
{40D7CA7F-EB86-4345-9641-AD27180C559D} = {7C218A3E-9BC8-48FF-B91B-BCACD828C0C9}
{5421394F-5619-4E4B-8923-F3FB30D5EFAD} = {7C218A3E-9BC8-48FF-B91B-BCACD828C0C9}
{B978E358-D2BE-4FA7-A21A-6661F3744DD7} = {8D53D749-D51C-46F8-A162-9371AAA6C2E7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B6FDB70C-A751-422C-ACD1-E35419495857}
Expand Down
5 changes: 5 additions & 0 deletions src/AppInstallerCLICore/Argument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ namespace AppInstaller::CLI
return { type, "retro"_liv, ArgTypeCategory::None, ArgTypeExclusiveSet::ProgressBarOption };
case Execution::Args::Type::RainbowStyle:
return { type, "rainbow"_liv, ArgTypeCategory::None, ArgTypeExclusiveSet::ProgressBarOption };
case Execution::Args::Type::NoProgress:
return { type, "no-progress"_liv, ArgTypeCategory::None, ArgTypeExclusiveSet::ProgressBarOption };
case Execution::Args::Type::Help:
return { type, "help"_liv, APPINSTALLER_CLI_HELP_ARGUMENT_TEXT_CHAR };
case Execution::Args::Type::Info:
Expand Down Expand Up @@ -432,6 +434,8 @@ namespace AppInstaller::CLI
return Argument{ type, Resource::String::RainbowArgumentDescription, ArgumentType::Flag, Argument::Visibility::Hidden };
case Args::Type::RetroStyle:
return Argument{ type, Resource::String::RetroArgumentDescription, ArgumentType::Flag, Argument::Visibility::Hidden };
case Args::Type::NoProgress:
return Argument{ type, Resource::String::NoProgressArgumentDescription, ArgumentType::Flag, Argument::Visibility::Hidden };
case Args::Type::VerboseLogs:
return Argument{ type, Resource::String::VerboseLogsArgumentDescription, ArgumentType::Flag };
case Args::Type::CustomHeader:
Expand Down Expand Up @@ -503,6 +507,7 @@ namespace AppInstaller::CLI
args.push_back(ForType(Args::Type::NoVT));
args.push_back(ForType(Args::Type::RainbowStyle));
args.push_back(ForType(Args::Type::RetroStyle));
args.push_back(ForType(Args::Type::NoProgress));
args.push_back(ForType(Args::Type::VerboseLogs));
args.push_back(ForType(Args::Type::IgnoreWarnings));
args.emplace_back(Args::Type::DisableInteractivity, Resource::String::DisableInteractivityArgumentDescription, ArgumentType::Flag, false);
Expand Down
1 change: 1 addition & 0 deletions src/AppInstallerCLICore/ExecutionArgs.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ namespace AppInstaller::CLI::Execution
NoVT, // Disable VirtualTerminal outputs
RetroStyle, // Makes progress display as retro
RainbowStyle, // Makes progress display as a rainbow
NoProgress, // Disables progress bar and spinner
Help, // Show command usage
Info, // Show general info about WinGet
VerboseLogs, // Increases winget logging level to verbose
Expand Down
6 changes: 5 additions & 1 deletion src/AppInstallerCLICore/ExecutionContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,11 @@ namespace AppInstaller::CLI::Execution
}

// Set visual style
if (Args.Contains(Args::Type::NoVT))
if (Args.Contains(Args::Type::NoProgress))
{
Reporter.SetStyle(VisualStyle::Disabled);
}
else if (Args.Contains(Args::Type::NoVT))
{
Reporter.SetStyle(VisualStyle::NoVT);
}
Expand Down
1 change: 1 addition & 0 deletions src/AppInstallerCLICore/Resources.h
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,7 @@ namespace AppInstaller::CLI::Resource
WINGET_DEFINE_RESOURCE_STRINGID(NoPackageSelectionArgumentProvided);
WINGET_DEFINE_RESOURCE_STRINGID(NoPackagesFoundInImportFile);
WINGET_DEFINE_RESOURCE_STRINGID(NoProxyArgumentDescription);
WINGET_DEFINE_RESOURCE_STRINGID(NoProgressArgumentDescription);
WINGET_DEFINE_RESOURCE_STRINGID(NoRepairInfoFound);
WINGET_DEFINE_RESOURCE_STRINGID(Notes);
WINGET_DEFINE_RESOURCE_STRINGID(NoUninstallInfoFound);
Expand Down
3 changes: 3 additions & 0 deletions src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw
Original file line number Diff line number Diff line change
Expand Up @@ -2867,6 +2867,9 @@ Please specify one of them using the --source option to proceed.</value>
<data name="NoProxyArgumentDescription" xml:space="preserve">
<value>Disable the use of proxy for this execution</value>
</data>
<data name="NoProgressArgumentDescription" xml:space="preserve">
<value>Disables the progress bar and spinner</value>
</data>
<data name="ResetAdminSettingFailed" xml:space="preserve">
<value>Cannot reset {0}. This setting is controlled by policy. For more information contact your system administrator.</value>
<comment>{Locked="{0}"} The value will be replaced with the feature name</comment>
Expand Down
Loading