-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Install flow aware of package installed status #2539
Changes from all commits
978404f
da71018
b488d4b
c4979b8
a2418ac
80f6693
ab46ab2
83594fb
a8771fd
541c2a3
9b19763
f84bbe5
43e7947
9029179
aa497e8
4629a79
72c5113
625507a
471ac70
0f7a1df
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
#include "InstallCommand.h" | ||
#include "Workflows/CompletionFlow.h" | ||
#include "Workflows/InstallFlow.h" | ||
#include "Workflows/UpdateFlow.h" | ||
#include "Workflows/WorkflowBase.h" | ||
#include "Resources.h" | ||
|
||
|
@@ -45,6 +46,7 @@ namespace AppInstaller::CLI | |
Argument::ForType(Args::Type::CustomHeader), | ||
Argument::ForType(Args::Type::AcceptSourceAgreements), | ||
Argument::ForType(Args::Type::Rename), | ||
Argument::ForType(Args::Type::Force), | ||
}; | ||
} | ||
|
||
|
@@ -122,12 +124,28 @@ namespace AppInstaller::CLI | |
{ | ||
context.SetFlags(ContextFlag::ShowSearchResultsOnPartialFailure); | ||
|
||
context << | ||
Workflow::ReportExecutionStage(ExecutionStage::Discovery) << | ||
Workflow::GetManifest << | ||
Workflow::SelectInstaller << | ||
Workflow::EnsureApplicableInstaller << | ||
Workflow::CheckForUnsupportedArgs << | ||
Workflow::InstallSinglePackage; | ||
if (context.Args.Contains(Execution::Args::Type::Manifest)) | ||
{ | ||
context << | ||
Workflow::ReportExecutionStage(ExecutionStage::Discovery) << | ||
Workflow::GetManifestFromArg << | ||
Workflow::SelectInstaller << | ||
Workflow::EnsureApplicableInstaller << | ||
Workflow::InstallSinglePackage; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Shouldn't install from a manifest behave as an upgrade as well (when appropriate)? |
||
} | ||
else | ||
{ | ||
context << | ||
Workflow::ReportExecutionStage(ExecutionStage::Discovery) << | ||
Workflow::OpenSource(); | ||
|
||
if (!context.Args.Contains(Execution::Args::Type::Force)) | ||
{ | ||
context << | ||
Workflow::OpenCompositeSource(Repository::PredefinedSource::Installed, false, Repository::CompositeSearchBehavior::AvailablePackages); | ||
} | ||
|
||
context << Workflow::InstallOrUpgradeSinglePackage(false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this also need to be applied to |
||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
side note: I've thought that it would be great to collapse the manifest flow into the normal one by making
OpenSource
create a simple in-memory source for the manifest so that it could behave exactly as everything else.