blob: b025a9b783135ce7d20ab06a528f8fd8a2039cbf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
From d67ee300b6cbd9deaaa8c5e506e836e253f7b77d Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Fri, 25 Dec 2009 07:02:32 +0000
Subject: [PATCH 1/2] state: Default interactive action is Yes
When pressing only <enter> on the question "..continue [Y/n]?" then
lets take that as a "yes"
---
src/state.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/state.c b/src/state.c
index 94afe86..1bd29bf 100644
--- a/src/state.c
+++ b/src/state.c
@@ -771,7 +771,7 @@ int apk_state_commit(struct apk_state *state,
printf("Do you want to continue [Y/n]? ");
fflush(stdout);
r = fgetc(stdin);
- if (r != 'y' && r != 'Y')
+ if (r != 'y' && r != 'Y' && r != '\n')
return -1;
}
}
--
1.6.5.7
|