ahoy-cli / ahoy

Create self-documenting cli programs from YAML files. Easily wrap bash, grunt, npm, docker, (anything) to standardize your processes and make the lives of the people working on your project better.
http://ahoycli.com/
MIT License
265 stars 36 forks source link

fix!: [#4] Show overwrite warning for `ahoy init` #97

Closed ocean closed 2 years ago

ocean commented 2 years ago

Fix for #4

Shows a warning and a confirmation prompt when running ahoy init if an .ahoy.yml file already exists in the current directory and would otherwise be overwritten.

BREAKING CHANGE: The warning prompt requires user input, so this may require updating of e.g. scripted calls to ahoy init. The prompt can be overruled by passing the "force" flag, e.g. ahoy init --force

If the --force flag is passed, the init command goes ahead, but a warning message is still shown:

"Warning: '--force' parameter passed, overwriting .ahoy.yml in current directory.".

ocean commented 2 years ago

@AlexSkrypnyk Ok cool. A warning message is still shown if you pass the --force flag, but the command goes ahead anyway.

Do you reckon I should remove that or still have it?

AlexSkrypnyk commented 2 years ago

@ocean I think we should still have the message.

AlexSkrypnyk commented 2 years ago

@ocean please feel free to merge at your earliest convenience. thank you