From 32580ebafd0bae3a12e6bf0887913a89df90d529 Mon Sep 17 00:00:00 2001 From: guinux <nuxgui@gmail.com> Date: Tue, 9 Jul 2019 09:17:20 +0200 Subject: [PATCH] fix #614 --- src/transaction-cli.vala | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/transaction-cli.vala b/src/transaction-cli.vala index 990d7d30..c7f29d10 100644 --- a/src/transaction-cli.vala +++ b/src/transaction-cli.vala @@ -313,9 +313,6 @@ namespace Pamac { } bool ask_user (string question) { - if (no_confirm) { - return true; - } // ask user confirmation stdout.printf ("%s %s ", question, dgettext (null, "[y/N]")); char buf[32]; @@ -337,12 +334,18 @@ namespace Pamac { protected override bool ask_import_key (string pkgname, string key, string owner) { stdout.printf ("%s.\n".printf (dgettext (null, "The PGP key %s is needed to verify %s source files").printf (key, pkgname))); + if (no_confirm) { + return true; + } return ask_user ("%s ?".printf (dgettext (null, "Trust %s and import the PGP key").printf (owner))); } protected override bool ask_edit_build_files (TransactionSummary summary) { show_summary (summary); summary_shown = true; + if (no_confirm) { + return false; + } return ask_user ("%s ?".printf (dgettext (null, "Edit build files"))); } @@ -540,6 +543,9 @@ namespace Pamac { if (!summary_shown) { show_summary (summary); } + if (no_confirm) { + return true; + } return ask_user ("%s ?".printf (dgettext (null, "Apply transaction"))); } -- GitLab