friends-of-presta / fop_console

Prestashop Module providing a set of shell/terminal commands for developers (PrestaShop 1.7.5+)
Academic Free License v3.0
84 stars 35 forks source link

add an option to create a hook on fop:modules:hook (register a hook on a module) #163

Open SebSept opened 3 years ago

SebSept commented 3 years ago
Questions Answers
Command name fop:modules:hook (already exists)
Command description? Don't change the command, but add an option
Command parameters? --create (?)
Possible impacts? none except a simplier flow

when I run fop:modules:hook --module vueseclatees --hook displayTableauVueEclateeDispatch I have a message that this hook does not exists. So I run the command fop:add-hook --name displayTableauVueEclateeDispatch which annoys me with a title and a description (#106) :( Then I run the first command again.

Too long :(

Having an option create will not break anything and allow just to run the command again with the option to get what I want.

tom-combet commented 1 year ago

I think we could even create the hook by default if it doesn't exist, WDYT?

SebSept commented 1 year ago

Not creating it prevents typo, it's good for safety imo.

tom-combet commented 1 year ago

Ah yea, I see. So let's add this option. And when hook doesn't exist and the option is not provided, we can ask the user if he wants to create the hook?

SebSept commented 1 year ago

yes, that will be more user friendly :)