File tree 1 file changed +4
-2
lines changed
src/AppInstallerCLICore/Workflows
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 14
14
#include " AppInstallerSynchronization.h"
15
15
#include " MSStoreInstallerHandler.h"
16
16
#include " ManifestComparator.h"
17
+ #include < winget/PackageVersionSelection.h>
17
18
18
19
using namespace AppInstaller ::Manifest;
19
20
using namespace AppInstaller ::Msix;
@@ -443,10 +444,11 @@ namespace AppInstaller::CLI::Workflow
443
444
std::string_view requestedVersion = context.Args .Contains (Execution::Args::Type::Version) ? context.Args .GetArg (Execution::Args::Type::Version) : installedVersion.ToString ();
444
445
// If it's Store source with only one version unknown, use the unknown version for available version mapping.
445
446
const auto & package = context.Get <Execution::Data::Package>();
446
- auto versionKeys = package->GetAvailableVersionKeys ();
447
+ auto packageVersions = GetAvailableVersionsForInstalledVersion (package, installedPackage);
448
+ auto versionKeys = packageVersions->GetVersionKeys ();
447
449
if (versionKeys.size () == 1 )
448
450
{
449
- auto packageVersion = package-> GetAvailableVersion (versionKeys.at (0 ));
451
+ auto packageVersion = packageVersions-> GetVersion (versionKeys.at (0 ));
450
452
if (packageVersion->GetSource ().IsWellKnownSource (WellKnownSource::MicrosoftStore) &&
451
453
Utility::Version{ packageVersion->GetProperty (PackageVersionProperty::Version) }.IsUnknown ())
452
454
{
You can’t perform that action at this time.
0 commit comments