winget-cli

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

commit 9d93f82d2c80a593d396fb0c6994f660a8308fff
parent e0ac9653f30b93847784d43b56210d8e4a47eec4
Author: yao-msft <50888816+yao-msft@users.noreply.github.com>
Date:   Tue, 27 Sep 2022 13:55:02 -0700

map operation return code for msstore type as well (#2540)


Diffstat:
Msrc/AppInstallerCLICore/Workflows/MSStoreInstallerHandler.cpp | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/AppInstallerCLICore/Workflows/MSStoreInstallerHandler.cpp b/src/AppInstallerCLICore/Workflows/MSStoreInstallerHandler.cpp @@ -3,7 +3,6 @@ #include "pch.h" #include "MSStoreInstallerHandler.h" - namespace AppInstaller::CLI::Workflow { using namespace std::string_view_literals; @@ -138,6 +137,7 @@ namespace AppInstaller::CLI::Workflow else { context.Reporter.Info() << Resource::String::MSStoreInstallOrUpdateFailed << ' ' << WINGET_OSTREAM_FORMAT_HRESULT(errorCode) << std::endl; + context.Add<Execution::Data::OperationReturnCode>(errorCode); AICLI_LOG(CLI, Error, << "MSStore install failed. ProductId: " << Utility::ConvertToUTF8(productId) << " HResult: " << WINGET_OSTREAM_FORMAT_HRESULT(errorCode)); AICLI_TERMINATE_CONTEXT(errorCode); } @@ -181,6 +181,7 @@ namespace AppInstaller::CLI::Workflow else { context.Reporter.Info() << Resource::String::MSStoreInstallOrUpdateFailed << ' ' << WINGET_OSTREAM_FORMAT_HRESULT(errorCode) << std::endl; + context.Add<Execution::Data::OperationReturnCode>(errorCode); AICLI_LOG(CLI, Error, << "MSStore execution failed. ProductId: " << Utility::ConvertToUTF8(productId) << " HResult: " << WINGET_OSTREAM_FORMAT_HRESULT(errorCode)); AICLI_TERMINATE_CONTEXT(errorCode); }