Skip to content
Merged
Changes from 1 commit
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
5 changes: 3 additions & 2 deletions src/AppInstallerCLICore/Workflows/PortableFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,10 @@ namespace AppInstaller::CLI::Workflow
{
Manifest::ScopeEnum scope = Manifest::ScopeEnum::Unknown;
bool isUpdate = WI_IsFlagSet(context.GetFlags(), Execution::ContextFlag::InstallerExecutionUseUpdate);
if (isUpdate)
auto installedVersion = context.Get<Execution::Data::InstalledPackageVersion>();
if (isUpdate && installedVersion)
{
IPackageVersion::Metadata installationMetadata = context.Get<Execution::Data::InstalledPackageVersion>()->GetMetadata();
IPackageVersion::Metadata installationMetadata = installedVersion->GetMetadata();
auto installerScopeItr = installationMetadata.find(Repository::PackageVersionMetadata::InstalledScope);
if (installerScopeItr != installationMetadata.end())
{
Expand Down
Loading