From 227dc9421f38999cbb59ad024c7f636464e79134 Mon Sep 17 00:00:00 2001 From: sterni Date: Thu, 22 Jun 2023 13:05:20 +0200 Subject: fix(tools/magrathea): allow specifying just a target for mg run Resolves b/232. Change-Id: I4a32e4fe90c819e3fc98da35d370c84b2f3d3722 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8842 Autosubmit: sterni Reviewed-by: tazjin Tested-by: BuildkiteCI --- tools/magrathea/mg.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/magrathea/mg.scm b/tools/magrathea/mg.scm index f3a615f81890..2de60c8d4873 100644 --- a/tools/magrathea/mg.scm +++ b/tools/magrathea/mg.scm @@ -335,6 +335,7 @@ if you meant to pass these arguments to nix, please separate them with (match args [() (execute-run (empty-target))] [("--" . rest) (execute-run (empty-target) rest)] + [(target) (execute-run (guarantee-success (parse-target target)))] [(target . ("--" . rest)) (execute-run (guarantee-success (parse-target target)) rest)] ;; TODO(sterni): flag for selecting binary name [_ (mg-error "usage: mg run [] [-- ] (hint: use \"--\" to separate the `mg run []` invocation from the arguments you're passing to the built executable)")])) -- cgit 1.4.1