about summary refs log tree commit diff
path: root/tvix/cli/src
diff options
context:
space:
mode:
authorRyan Lahfa <tvl@lahfa.xyz>2023-12-29T18·18+0100
committerraitobezarius <tvl@lahfa.xyz>2024-01-03T23·48+0000
commitde6c8b75467168ee608eba0b08ba8847946814cc (patch)
tree0a85906a12827bfb1329a8caeee244bd5a7e5e61 /tvix/cli/src
parentf44ac2a5940a93248ec9cff83856208bd629ae20 (diff)
feat(tvix/cli): context-aware raw printing r/7341
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
Diffstat (limited to 'tvix/cli/src')
-rw-r--r--tvix/cli/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tvix/cli/src/main.rs b/tvix/cli/src/main.rs
index 17632cad1aab..acaf5c7eabfd 100644
--- a/tvix/cli/src/main.rs
+++ b/tvix/cli/src/main.rs
@@ -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())
     }