From b7be2660c92fe206e01c0236dc03e2dee03dfa3b Mon Sep 17 00:00:00 2001 From: sterni Date: Sun, 13 Feb 2022 17:44:43 +0100 Subject: fix(magrathea): print [mg] messages to stderr I want to add a shortcut to build and run e.g. scripts that are depot targets - for which it would be useful to not have stdout polluted by magrathea itself. Change-Id: Ic58fe28eafb4d0715e53beae041bfaa5d1745812 Reviewed-on: https://cl.tvl.fyi/c/depot/+/5276 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tools/magrathea/mg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/magrathea') diff --git a/tools/magrathea/mg.scm b/tools/magrathea/mg.scm index e5b0cb07d4..86fed6fc24 100644 --- a/tools/magrathea/mg.scm +++ b/tools/magrathea/mg.scm @@ -214,7 +214,7 @@ USAGE (define (execute-build t) (let ((expr (nix-expr-for t))) - (printf "[mg] building target ~A~%" t) + (fprintf (current-error-port) "[mg] building target ~A~%" t) (process-execute "nix-build" (list "-E" expr "--show-trace")))) (define (build args) @@ -232,7 +232,7 @@ USAGE (define (execute-shell t) (let ((expr (nix-expr-for t)) (user-shell (or (get-environment-variable "SHELL") "bash"))) - (printf "[mg] entering shell for ~A~%" t) + (fprintf (current-error-port) "[mg] entering shell for ~A~%" t) (process-execute "nix-shell" (list "-E" expr "--command" user-shell)))) -- cgit 1.4.1