From: Ian Jackson Date: Tue, 8 Jun 2021 11:23:45 +0000 (+0100) Subject: otter cli: reset -vv templating output goes to stdout X-Git-Tag: otter-0.7.0~32 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=6547e036647baecfc5eb297d82502240f823c573;p=otter.git otter cli: reset -vv templating output goes to stdout There's no other use for stdout here. Signed-off-by: Ian Jackson --- diff --git a/cli/forgame.rs b/cli/forgame.rs index 505769a8..70b2a7a0 100644 --- a/cli/forgame.rs +++ b/cli/forgame.rs @@ -45,7 +45,7 @@ mod reset_game { ap } - fn call(SCCA{ ma, args,.. }:SCCA) -> Result<(),AE> { + fn call(SCCA{ ma, args, mut out,.. }:SCCA) -> Result<(),AE> { let args = parse_args::(args, &subargs, &ok_id, None); let instance_name = ma.instance(); let mut chan = ma.access_game()?; @@ -58,7 +58,7 @@ mod reset_game { let spec_toml = bundles::spec_macroexpand(spec_toml, &mut |what,data|{ if ma.verbose >= 2 { for (lno,l) in data.split('\n').enumerate() { - eprintln!("spec {} {} {}", what, lno+1, l); + writeln!(out, "spec {} {} {}", what, lno+1, l)?; } } Ok(())