From 8732e626e23f4af08bdcc3fd5a6e11609053da92 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 23 Nov 2018 18:00:08 -0500 Subject: [PATCH] pkgman: Handle -y argument to "drop-repo" command. Found by -Werror=set-but-unused. --- src/bin/pkgman/command_drop_repo.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/bin/pkgman/command_drop_repo.cpp b/src/bin/pkgman/command_drop_repo.cpp index 9c4988a8bf..358322545a 100644 --- a/src/bin/pkgman/command_drop_repo.cpp +++ b/src/bin/pkgman/command_drop_repo.cpp @@ -43,7 +43,7 @@ DEFINE_COMMAND(DropRepoCommand, "drop-repo", kShortUsage, kLongUsage, int DropRepoCommand::Execute(int argc, const char* const* argv) { - bool yesMode = false; + bool interactive = true; while (true) { static struct option sLongOptions[] = { @@ -63,7 +63,7 @@ DropRepoCommand::Execute(int argc, const char* const* argv) break; case 'y': - yesMode = true; + interactive = false; break; default: @@ -79,8 +79,7 @@ DropRepoCommand::Execute(int argc, const char* const* argv) const char* repoName = argv[optind]; DecisionProvider decisionProvider; -// if (yesMode) -// decisionProvider.SetAcceptEverything(true); + decisionProvider.SetInteractive(interactive); JobStateListener listener; BContext context(decisionProvider, listener);