about summary refs log tree commit diff
path: root/users/Profpatsch/netencode
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-02-14T15·55+0100
committerProfpatsch <mail@profpatsch.de>2021-04-23T20·45+0000
commitc98dd8b352c4dac33ebb7302eaf527eb4b681502 (patch)
tree6598306f55574e3b0b09cd538ae0a5dfa0fe0c86 /users/Profpatsch/netencode
parent5ca71308a8f1ab61a3991991dd27bbb373a0d25f (diff)
feat(users/Profpatsch/lib): add eprint-stdin-netencode r/2545
Like `eprint-stdin`, but reads stdin as netencode and pretty-prints it
to stderr.

Change-Id: I430c010b0cac45f077cde9dadfd79adfa7a53eca
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2533
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users/Profpatsch/netencode')
-rw-r--r--users/Profpatsch/netencode/default.nix6
1 files changed, 3 insertions, 3 deletions
diff --git a/users/Profpatsch/netencode/default.nix b/users/Profpatsch/netencode/default.nix
index 843408941d82..33209276f92f 100644
--- a/users/Profpatsch/netencode/default.nix
+++ b/users/Profpatsch/netencode/default.nix
@@ -38,12 +38,12 @@ let
     extern crate exec_helpers;
 
     fn main() {
-      let (_, prog) = exec_helpers::args_for_exec("eprint-stdin-netencode", 0);
+      let (_, prog) = exec_helpers::args_for_exec("netencode-pretty", 0);
       let mut buf = vec![];
-      let u = netencode::u_from_stdin_or_die_user_error("eprint-stdin-netencode", &mut buf);
+      let u = netencode::u_from_stdin_or_die_user_error("netencode-pretty", &mut buf);
       match netencode_pretty::Pretty::from_u(u).print_multiline(&mut std::io::stdout()) {
         Ok(()) => {},
-        Err(err) => exec_helpers::die_temporary("eprint-stdin-netencode", format!("could not write to stdout: {}", err))
+        Err(err) => exec_helpers::die_temporary("netencode-pretty", format!("could not write to stdout: {}", err))
       }
     }
   '';