feat(tvix/cli): context-aware raw printing
Raw printing will transform the result into a string and print it. In case of a contextful string, this will fail by default, as expected. Change-Id: I5e564329e7b001adc57a77a9153b4425cb332bb7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10457 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
f44ac2a594
commit
de6c8b7546
1 changed files with 1 additions and 1 deletions
|
@ -213,7 +213,7 @@ fn run_file(mut path: PathBuf, args: &Args) {
|
|||
|
||||
fn println_result(result: &Value, raw: bool) {
|
||||
if raw {
|
||||
println!("{}", result.to_str().unwrap().as_str())
|
||||
println!("{}", result.to_contextful_str().unwrap().as_str())
|
||||
} else {
|
||||
println!("=> {} :: {}", result, result.type_of())
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue