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 <tazjin@tvl.su>
This commit is contained in:
sterni 2022-02-13 17:44:43 +01:00
parent 235eda6649
commit b7be2660c9

View file

@ -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))))