File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ func newCodeCmd() *cobra.Command {
1919 codeCmd := & cobra.Command {
2020 Use : "code" ,
2121 Short : "Open a codespace in VS Code" ,
22- Args : cobra .MaximumNArgs ( 1 ) ,
22+ Args : cobra .NoArgs ,
2323 RunE : func (cmd * cobra.Command , args []string ) error {
2424 return code (codespace , useInsiders )
2525 },
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ func newLogsCmd() *cobra.Command {
2424 logsCmd := & cobra.Command {
2525 Use : "logs" ,
2626 Short : "Access codespace logs" ,
27- Args : cobra .MaximumNArgs ( 1 ) ,
27+ Args : cobra .NoArgs ,
2828 RunE : func (cmd * cobra.Command , args []string ) error {
2929 return logs (context .Background (), log , codespace , follow )
3030 },
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ func newPortsPublicCmd() *cobra.Command {
158158 return & cobra.Command {
159159 Use : "public <port>" ,
160160 Short : "Mark port as public" ,
161- Args : cobra .MinimumNArgs (1 ),
161+ Args : cobra .ExactArgs (1 ),
162162 RunE : func (cmd * cobra.Command , args []string ) error {
163163 codespace , err := cmd .Flags ().GetString ("codespace" )
164164 if err != nil {
@@ -179,7 +179,7 @@ func newPortsPrivateCmd() *cobra.Command {
179179 return & cobra.Command {
180180 Use : "private <port>" ,
181181 Short : "Mark port as private" ,
182- Args : cobra .MinimumNArgs (1 ),
182+ Args : cobra .ExactArgs (1 ),
183183 RunE : func (cmd * cobra.Command , args []string ) error {
184184 codespace , err := cmd .Flags ().GetString ("codespace" )
185185 if err != nil {
You can’t perform that action at this time.
0 commit comments