summaryrefslogtreecommitdiffstats
path: root/cli/src/input.c
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2016-03-08 13:31:28 +0100
committerNiels de Vos <ndevos@redhat.com>2016-03-11 08:59:04 -0800
commit2492bbc3bb8a115be0b0a6fe85fd42f906df8395 (patch)
tree38258593807b3b88f0370fa11b2ad2e250dd34d1 /cli/src/input.c
parent206ccaa4f417da633af3860a3ffae896d517fdd0 (diff)
cli: Don't override cli mode when stdin in not a tty
Cherry picked from commit f139fc7e44da27670e90bd7ba55ff80e7c8b8ecd: > Change-Id: I801c6e6ecd6c5a91e487e8e54ec5f684d450a080 > BUG: 1047378 > Signed-off-by: Kaushal M <kaushal@redhat.com> > Reviewed-on: http://review.gluster.org/6687 > Tested-by: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Vijay Bellur <vbellur@redhat.com> Change-Id: I801c6e6ecd6c5a91e487e8e54ec5f684d450a080 BUG: 1313968 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/13648 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
Diffstat (limited to 'cli/src/input.c')
-rw-r--r--cli/src/input.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/input.c b/cli/src/input.c
index a8ea46c6db6..26f337c3c27 100644
--- a/cli/src/input.c
+++ b/cli/src/input.c
@@ -87,7 +87,7 @@ cli_input_init (struct cli_state *state)
cli_rl_enable (state);
} else {
state->prompt = "";
- state->mode = GLUSTER_MODE_SCRIPT | GLUSTER_MODE_ERR_FATAL;
+ state->mode |= GLUSTER_MODE_SCRIPT | GLUSTER_MODE_ERR_FATAL;
}
if (!state->rl_enabled)