Skip to content

Commit

Permalink
fix(cli): add some options back for compatibility
Browse files Browse the repository at this point in the history
--prune and --all options should be provided for compatibility with older command line parsing.

Bug: https://pms.uniontech.com/bug-view-288097.html
  • Loading branch information
dengbo11 committed Nov 20, 2024
1 parent ab490e3 commit 124bc72
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/ll-cli/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,9 @@ ll-cli install stable:org.deepin.demo/0.0.0.1/x86_64
cliInstall->add_flag("-y", options.confirmOpt, _("Automatically answer yes to all questions"));

// add sub command uninstall
// These two options are used when uninstalling apps in the app Store and need to be retained
// but hidden.
bool pruneOpt = false, allOpt = false;
auto cliUninstall =
commandParser.add_subcommand("uninstall", _("Uninstall the application or runtimes"))
->group(CliBuildInGroup);
Expand All @@ -352,6 +355,8 @@ ll-cli install stable:org.deepin.demo/0.0.0.1/x86_64
cliUninstall->add_option("--module", options.module, _("Uninstall a specify module"))
->type_name("MODULE")
->check(validatorString);
cliUninstall->add_flag("--prune", pruneOpt, "Remove all unused modules")->group(CliHiddenGroup);
cliUninstall->add_flag("--all", allOpt, "Uninstall all modules")->group(CliHiddenGroup);

// add sub command upgrade
auto cliUpgrade =
Expand Down

0 comments on commit 124bc72

Please sign in to comment.