From: Ian Jackson Date: Sun, 6 Jun 2021 23:20:41 +0000 (+0100) Subject: otter cli: With -vv, mention skipped nonexistent prefs X-Git-Tag: otter-0.7.0~59 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=146d8e33d546055abf40ddb0fbc482fb57be7318;p=otter.git otter cli: With -vv, mention skipped nonexistent prefs Signed-off-by: Ian Jackson --- diff --git a/cli/otter.rs b/cli/otter.rs index ac0692be..b3d6383c 100644 --- a/cli/otter.rs +++ b/cli/otter.rs @@ -355,7 +355,13 @@ fn main() { let data: Option = (||{ let data = match fs::read_to_string(&prefs_path) { - Err(e) if e.kind() == ErrorKind::NotFound => return Ok(None), + Err(e) if e.kind() == ErrorKind::NotFound => { + if parsed.verbose >= 2 { + eprintln!("prefs file {:?} does not exist, skipping", + &prefs_path); + } + return Ok(None) + }, Err(e) => throw!(AE::from(e).context("open and read")), Ok(data) => data, };