fix: --pl subcommand not working correctly anymore

This commit is contained in:
WerWolv
2025-01-28 19:47:20 +01:00
parent d45dd45720
commit 53fc018ada
3 changed files with 8 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ namespace hex::subcommands {
while (argsIter != args.end()) {
const std::string &arg = *argsIter;
if (!currentSubCommandArgs.empty() && arg.starts_with("--")) {
if (!currentSubCommandArgs.empty() && arg.starts_with("--") && !(currentSubCommand.has_value() && currentSubCommand->type == SubCommand::Type::SubCommand)) {
// Save command to run
if (currentSubCommand) {
subCommands.emplace_back(*currentSubCommand, currentSubCommandArgs);