Don't emit explain with json short messages.

This commit is contained in:
Eric Huss 2019-09-24 16:53:33 -07:00
parent 6ef275e6c3
commit 6d07874e88
2 changed files with 7 additions and 2 deletions

View file

@ -112,6 +112,13 @@ impl Emitter for JsonEmitter {
panic!("failed to print notification: {:?}", e);
}
}
fn should_show_explain(&self) -> bool {
match self.json_rendered {
HumanReadableErrorType::Short(_) => false,
_ => true,
}
}
}
// The following data types are provided just for serialisation.