File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
src/AppInstallerCLICore/Workflows Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -111,9 +111,10 @@ namespace AppInstaller::CLI::Workflow
111111 {
112112 Manifest::ScopeEnum scope = Manifest::ScopeEnum::Unknown;
113113 bool isUpdate = WI_IsFlagSet (context.GetFlags (), Execution::ContextFlag::InstallerExecutionUseUpdate);
114- if (isUpdate)
114+ auto installedVersion = context.Get <Execution::Data::InstalledPackageVersion>();
115+ if (isUpdate && installedVersion)
115116 {
116- IPackageVersion::Metadata installationMetadata = context. Get <Execution::Data::InstalledPackageVersion>() ->GetMetadata ();
117+ IPackageVersion::Metadata installationMetadata = installedVersion ->GetMetadata ();
117118 auto installerScopeItr = installationMetadata.find (Repository::PackageVersionMetadata::InstalledScope);
118119 if (installerScopeItr != installationMetadata.end ())
119120 {
You can’t perform that action at this time.
0 commit comments