winget-cli

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 708941baa52c4899ffa2fa0ebb87798b05341338
parent d425b0d16d9051280bceab5829689841c1224918
Author: jamespik <48262337+jamespik@users.noreply.github.com>
Date:   Wed,  6 May 2020 12:21:19 -0700

Update version command as well. (#102)

The version command also is user visible.
Diffstat:
Msrc/AppInstallerCLICore/Command.cpp | 5+----
Msrc/AppInstallerCLICore/Commands/RootCommand.cpp | 2+-
Msrc/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw | 3+++
3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/AppInstallerCLICore/Command.cpp b/src/AppInstallerCLICore/Command.cpp @@ -26,11 +26,8 @@ namespace AppInstaller::CLI void Command::OutputIntroHeader(Execution::Reporter& reporter) const { - // TODO: When these strings are ported to resource file, - // Create both a Preview and a Non-Preview string. That way we can swap the value without - // incurring additional localization cost. reporter.Info() << - "Windows Package Manager v" << Runtime::GetClientVersion() << " Preview"<< std::endl << + "Windows Package Manager v" << Runtime::GetClientVersion() << " " << Resources::GetInstance().ResolveWingetString(L"PreviewVersion").c_str() << std::endl << "Copyright (c) Microsoft Corporation. All rights reserved." << std::endl; } diff --git a/src/AppInstallerCLICore/Commands/RootCommand.cpp b/src/AppInstallerCLICore/Commands/RootCommand.cpp @@ -54,7 +54,7 @@ namespace AppInstaller::CLI } else if (context.Args.Contains(Execution::Args::Type::ListVersions)) { - context.Reporter.Info() << 'v' << Runtime::GetClientVersion() << std::endl; + context.Reporter.Info() << 'v' << Runtime::GetClientVersion() << ' ' << Resources::GetInstance().ResolveWingetString(L"PreviewVersion").c_str() << std::endl; } else { diff --git a/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw b/src/AppInstallerCLIPackage/Shared/Strings/en-us/winget.resw @@ -224,6 +224,9 @@ <data name="PlainArgumentDescription" xml:space="preserve"> <value>Progress display as the default color</value> </data> + <data name="PreviewVersion" xml:space="preserve"> + <value>Preview</value> + </data> <data name="QueryArgumentDescription" xml:space="preserve"> <value>The query used to search for an app</value> </data>