diff --git a/src/AppInstallerCLICore/Argument.cpp b/src/AppInstallerCLICore/Argument.cpp index d2be06eae64..52c353e3928 100644 --- a/src/AppInstallerCLICore/Argument.cpp +++ b/src/AppInstallerCLICore/Argument.cpp @@ -46,7 +46,7 @@ namespace AppInstaller::CLI case Execution::Args::Type::Command: return { type, "command"_liv, "cmd"_liv, ArgTypeCategory::PackageQuery | ArgTypeCategory::SinglePackageQuery }; case Execution::Args::Type::Source: - return { type, "source"_liv, 's', ArgTypeCategory::Source }; + return { type, "source"_liv, 's', ArgTypeCategory::QuerySource }; case Execution::Args::Type::Count: return { type, "count"_liv, 'n', ArgTypeCategory::PackageQuery | ArgTypeCategory::SinglePackageQuery }; case Execution::Args::Type::Exact: @@ -219,11 +219,11 @@ namespace AppInstaller::CLI return { type, "force"_liv, ArgTypeCategory::CopyFlagToSubContext }; case Execution::Args::Type::DependencySource: - return { type, "dependency-source"_liv, ArgTypeCategory::Source }; + return { type, "dependency-source"_liv, ArgTypeCategory::ExtendedSource }; case Execution::Args::Type::CustomHeader: - return { type, "header"_liv, ArgTypeCategory::Source }; + return { type, "header"_liv, ArgTypeCategory::QuerySource }; case Execution::Args::Type::AcceptSourceAgreements: - return { type, "accept-source-agreements"_liv, ArgTypeCategory::Source }; + return { type, "accept-source-agreements"_liv, ArgTypeCategory::ExtendedSource }; case Execution::Args::Type::ToolVersion: return { type, "version"_liv, 'v' }; @@ -459,7 +459,7 @@ namespace AppInstaller::CLI // If a manifest is specified, we cannot also have arguments for searching if (WI_IsFlagSet(categories, ArgTypeCategory::Manifest) && - WI_IsAnyFlagSet(categories, ArgTypeCategory::PackageQuery | ArgTypeCategory::Source)) + WI_IsAnyFlagSet(categories, ArgTypeCategory::PackageQuery | ArgTypeCategory::QuerySource)) { throw CommandException(Resource::String::BothManifestAndSearchQueryProvided); } diff --git a/src/AppInstallerCLICore/Argument.h b/src/AppInstallerCLICore/Argument.h index e8e32e909de..d33741eaf1d 100644 --- a/src/AppInstallerCLICore/Argument.h +++ b/src/AppInstallerCLICore/Argument.h @@ -58,15 +58,19 @@ namespace AppInstaller::CLI // Arguments for installer or uninstaller behavior, which do not work for multiple packages. // E.g.: --override SingleInstallerBehavior = 0x20, - // Arguments for selecting or interacting with the source. - // E.g.: --accept-source-agreements - Source = 0x40, + // Arguments for selecting or interacting with the source used for initial querying + // E.g.: --header + QuerySource = 0x40, // Arguments that only make sense when talking about multiple packages MultiplePackages = 0x80, // Flag arguments that should be copied over when creating a sub-context CopyFlagToSubContext = 0x100, // Arguments with associated values that should be copied over when creating a sub-context CopyValueToSubContext = 0x200, + // Arguments for selecting or interacting with dependencies or setting specific source behaviors + // E.g.: --dependency-source + // E.g.: --accept-source-agreements + ExtendedSource = 0x400, }; DEFINE_ENUM_FLAG_OPERATORS(ArgTypeCategory);