Skip to content

Conversation

ocean
Copy link
Member

@ocean ocean commented Jul 17, 2022

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.".

Drew Robinson added 2 commits July 17, 2022 14:55
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`
@ocean ocean requested a review from AlexSkrypnyk July 17, 2022 08:30
Drew Robinson added 2 commits July 17, 2022 17:07
Also theoretically improve cross platform testing,
and replace deprecated `ioutil.*` functions as required.
Copy link
Collaborator

@AlexSkrypnyk AlexSkrypnyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocean
LGTM

Could you please update the description of the PR to explicitly explain if the message is still shown if the --force is passed.

@ocean
Copy link
Member Author

ocean commented Jul 19, 2022

@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?

@ocean ocean requested a review from AlexSkrypnyk July 19, 2022 06:49
@AlexSkrypnyk
Copy link
Collaborator

@ocean
I think we should still have the message.

@AlexSkrypnyk
Copy link
Collaborator

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

@ocean ocean merged commit 8fc2fd0 into ahoy-cli:master Jul 25, 2022
@ocean ocean deleted the init-overwrite-warning branch July 25, 2022 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants