diff --git a/src/AppInstallerCLICore/Commands/SourceCommand.cpp b/src/AppInstallerCLICore/Commands/SourceCommand.cpp index f11890f33b..afeea15b5a 100644 --- a/src/AppInstallerCLICore/Commands/SourceCommand.cpp +++ b/src/AppInstallerCLICore/Commands/SourceCommand.cpp @@ -84,17 +84,19 @@ namespace AppInstaller::CLI Workflow::AddSource << Workflow::OpenSourceForSourceAdd; - if (context.IsTerminated() && - (context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_SOURCE_OPEN_FAILED || - context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_SOURCE_AGREEMENTS_NOT_ACCEPTED)) + if (context.IsTerminated()) { - auto contextForRemovePtr = context.Clone(); - Context& contextForRemove = *contextForRemovePtr; - contextForRemove.Args.AddArg(Args::Type::SourceName, context.Args.GetArg(Args::Type::SourceName)); - - contextForRemove << - Workflow::GetSourceListWithFilter << - Workflow::RemoveSources; + if (context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_SOURCE_OPEN_FAILED || + context.GetTerminationHR() == APPINSTALLER_CLI_ERROR_SOURCE_AGREEMENTS_NOT_ACCEPTED) + { + auto contextForRemovePtr = context.Clone(); + Context& contextForRemove = *contextForRemovePtr; + contextForRemove.Args.AddArg(Args::Type::SourceName, context.Args.GetArg(Args::Type::SourceName)); + + contextForRemove << + Workflow::GetSourceListWithFilter << + Workflow::RemoveSources; + } } else { diff --git a/src/AppInstallerCLIE2ETests/BaseCommand.cs b/src/AppInstallerCLIE2ETests/BaseCommand.cs index ce1b0b0e24..33b7240646 100644 --- a/src/AppInstallerCLIE2ETests/BaseCommand.cs +++ b/src/AppInstallerCLIE2ETests/BaseCommand.cs @@ -58,7 +58,8 @@ public void InitializeAllFeatures(bool status) { experimentalArg = status, experimentalCmd = status, - experimentalMSStore = status, + dependencies = status, + directMSI = status, } };