We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b641d2d commit 2470386Copy full SHA for 2470386
cmd/limactl/stop.go
@@ -22,7 +22,7 @@ func newStopCommand() *cobra.Command {
22
var stopCmd = &cobra.Command{
23
Use: "stop INSTANCE",
24
Short: "Stop an instance",
25
- Args: cobra.ExactArgs(1),
+ Args: cobra.MaximumNArgs(1),
26
RunE: stopAction,
27
ValidArgsFunction: stopBashComplete,
28
}
@@ -32,9 +32,9 @@ func newStopCommand() *cobra.Command {
32
33
34
func stopAction(cmd *cobra.Command, args []string) error {
35
- instName := args[0]
36
- if instName == "" {
37
- instName = DefaultInstanceName
+ instName := DefaultInstanceName
+ if len(args) > 0 {
+ instName = args[0]
38
39
40
inst, err := store.Inspect(instName)
0 commit comments