File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -5,19 +5,22 @@ import (
5
5
6
6
"github.com/spf13/cobra"
7
7
8
+ "github.com/coder/coder/cli/cliarg"
8
9
"github.com/coder/coder/cli/cliui"
9
10
"github.com/coder/coder/coderd/database"
10
11
"github.com/coder/coder/codersdk"
11
12
)
12
13
14
+ const DeleteError = "Did you forget to pass a workspace name? Run command with --help to see an example."
15
+
13
16
// nolint
14
17
func delete () * cobra.Command {
15
18
return & cobra.Command {
16
19
Annotations : workspaceCommand ,
17
20
Use : "delete <workspace>" ,
18
21
Short : "Delete a workspace" ,
19
22
Aliases : []string {"rm" },
20
- Args : cobra . ExactArgs ( 1 ),
23
+ Args : cliarg . ExactNamedArg ( "workspace" , DeleteError ),
21
24
RunE : func (cmd * cobra.Command , args []string ) error {
22
25
client , err := createClient (cmd )
23
26
if err != nil {
You can’t perform that action at this time.
0 commit comments