aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2003-10-13 22:20:24 +0000
committerJason Woodward2003-10-13 22:20:24 +0000
commit265b85826201113ee92364569aad2e23af946e14 (patch)
treef76f7ed2fe257864f3e0044aa6e40f4d3699df14
parent084bb4d563ee238b6a0851cf5906c1769800aad4 (diff)
downloadslapt-get-265b85826201113ee92364569aad2e23af946e14.tar.gz
no prompt and interactive still show upgrade transaction report, just don't prompt for 'are you sure'
-rw-r--r--src/transaction.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/transaction.c b/src/transaction.c
index be2244e..30ce07f 100644
--- a/src/transaction.c
+++ b/src/transaction.c
@@ -46,8 +46,7 @@ int handle_transaction(const rc_config *global_config, transaction *tran){
*/
if(
(tran->upgrade_pkgs->pkg_count > 0 || tran->remove_pkgs->pkg_count > 0)
- && (global_config->download_only == 0 && global_config->simulate == 0
- && global_config->no_prompt == 0 && global_config->interactive == 0 )
+ && (global_config->download_only == 0 && global_config->simulate == 0)
){
/* show pkgs to exclude */
@@ -100,11 +99,13 @@ int handle_transaction(const rc_config *global_config, transaction *tran){
);
/* prompt */
- printf("Do you want to continue? [y/N] ");
- fgets(prompt_answer,10,stdin);
- if( tolower(prompt_answer[0]) != 'y' ){
- printf("Abort.\n");
- return 1;
+ if( global_config->no_prompt == 0 && global_config->interactive == 0 ) {
+ printf("Do you want to continue? [y/N] ");
+ fgets(prompt_answer,10,stdin);
+ if( tolower(prompt_answer[0]) != 'y' ){
+ printf("Abort.\n");
+ return 1;
+ }
}
}