cli icon indicating copy to clipboard operation
cli copied to clipboard

show migration new help when called without arguments

Open kandros opened this issue 3 years ago • 1 comments

print help instead of validation error when passing 0 or more than 1 arguments to migration new

What kind of change does this PR introduce?

feature

What is the current behavior?

image

What is the new behavior?

image

kandros avatar Aug 29 '22 15:08 kandros

@soedirgo @sweatybridge I've seen this behaviour in many commands, if the change I made is ok for you I can use it to more commands

what do you think?

I don't like much the unchecked error _ = cmd.Help() cause it will never error but the linter is enforcing that check

kandros avatar Aug 29 '22 15:08 kandros

Hey there, sorry for the late response. I think you can just remove this line to show usage for all commands:

https://github.com/supabase/cli/blob/3968f1cb2c75cdd797e266453086851d7d493c45/cmd/root.go#L26

soedirgo avatar Oct 20 '22 07:10 soedirgo

Closing this in favour of #562

sweatybridge avatar Oct 27 '22 02:10 sweatybridge