Skip to content

Commit

Permalink
move check to the top
Browse files Browse the repository at this point in the history
  • Loading branch information
mdanish-kh committed Oct 18, 2023
1 parent c33686e commit f464f31
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/AppInstallerCLICore/Workflows/DependenciesFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,11 @@ namespace AppInstaller::CLI::Workflow

void CreateDependencySubContexts::operator()(Execution::Context& context) const
{
if (context.Args.Contains(Execution::Args::Type::SkipDependencies))
{
return;
}

auto info = context.Reporter.Info();
auto error = context.Reporter.Error();
const auto& rootManifest = context.Get<Execution::Data::Manifest>();
Expand All @@ -249,9 +254,9 @@ namespace AppInstaller::CLI::Workflow
const auto& rootInstaller = context.Get<Execution::Data::Installer>();
const auto& rootDependencies = rootInstaller->Dependencies;

if (rootDependencies.Empty() || context.Args.Contains(Execution::Args::Type::SkipDependencies))
if (rootDependencies.Empty())
{
// If there's no dependencies or user skips them, there's nothing to do aside of logging the outcome
// If there's no dependencies, there's nothing to do aside of logging the outcome
return;
}

Expand Down

0 comments on commit f464f31

Please sign in to comment.