about summary refs log tree commit diff
path: root/tools/magrathea
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2023-06-22T11·05+0200
committerclbot <clbot@tvl.fyi>2023-06-23T16·47+0000
commit227dc9421f38999cbb59ad024c7f636464e79134 (patch)
treeb47cffe20b992732fef42c7d3ce6132e6246f4d1 /tools/magrathea
parentaedb609368626b2b0bd67700d4b0be4c16907c03 (diff)
fix(tools/magrathea): allow specifying just a target for mg run r/6348
Resolves b/232.

Change-Id: I4a32e4fe90c819e3fc98da35d370c84b2f3d3722
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8842
Autosubmit: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Diffstat (limited to 'tools/magrathea')
-rw-r--r--tools/magrathea/mg.scm1
1 files changed, 1 insertions, 0 deletions
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 [<target>] [-- <arguments>] (hint: use \"--\" to separate the `mg run [<target>]` invocation from the arguments you're passing to the built executable)")]))