From d677c6e4903464016ab75c36639622aae8165717 Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Wed, 1 Sep 2021 10:53:12 -0700 Subject: [PATCH] Fix `lima (start|stop|shell)` suggestion to remove instance name Because the lima wrapper turns `lima start foo` into `limactl shell default start foo` and the instance name should not be part of the suggestion "Perhaps you meant `limactl start foo`". Signed-off-by: Jan Dubois --- cmd/limactl/shell.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/limactl/shell.go b/cmd/limactl/shell.go index e2afc0e0fe6..1745470d078 100644 --- a/cmd/limactl/shell.go +++ b/cmd/limactl/shell.go @@ -41,10 +41,7 @@ func shellAction(clicontext *cli.Context) error { switch clicontext.Args().Get(1) { case "start", "delete", "shell": // `lima start` (alias of `limactl $LIMA_INSTANCE start`) is probably a typo of `limactl start` - logrus.Warnf("Perhaps you meant `limactl %s %s %s`?", - clicontext.Args().Get(1), - clicontext.Args().First(), - strings.Join(clicontext.Args().Slice()[2:], " ")) + logrus.Warnf("Perhaps you meant `limactl %s`?", strings.Join(clicontext.Args().Slice()[1:], " ")) } inst, err := store.Inspect(instName)