We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 27143e9 commit b1405e3Copy full SHA for b1405e3
1 file changed
src/AppInstallerCLICore/Workflows/PortableFlow.cpp
@@ -111,7 +111,11 @@ namespace AppInstaller::CLI::Workflow
111
{
112
Manifest::ScopeEnum scope = Manifest::ScopeEnum::Unknown;
113
bool isUpdate = WI_IsFlagSet(context.GetFlags(), Execution::ContextFlag::InstallerExecutionUseUpdate);
114
- auto installedVersion = context.Get<Execution::Data::InstalledPackageVersion>();
+ std::shared_ptr<Repository::IPackageVersion> installedVersion;
115
+ if (context.Contains(Execution::Data::InstalledPackageVersion))
116
+ {
117
+ installedVersion = context.Get<Execution::Data::InstalledPackageVersion>();
118
+ }
119
if (isUpdate && installedVersion)
120
121
IPackageVersion::Metadata installationMetadata = installedVersion->GetMetadata();
0 commit comments