Fix: Do not write newline character when asked not to do

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
This commit is contained in:
Matthias Beyer 2019-05-18 00:01:11 +02:00
parent 1d89844613
commit 9f100f2f75

View file

@ -180,7 +180,7 @@ pub fn ask_question(question: &str, nl: bool, output: &mut Write) -> Result<()>
if nl {
writeln!(output, "[imag]: {}?", Yellow.paint(question)).map_err(Error::from)
} else {
writeln!(output, "[imag]: {}?", Yellow.paint(question)).map_err(Error::from)
write!(output, "[imag]: {}?", Yellow.paint(question)).map_err(Error::from)
}
}