Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --(no-)overwrite parameters to control override ability #298

Merged
merged 18 commits into from
Oct 9, 2024

Conversation

shatakshiiii
Copy link
Contributor

@shatakshiiii shatakshiiii commented Oct 1, 2024

This is a follow up PR for #294, that introduces --overwrite parameter that can overwrite existing files or directories and a subsequent --no-overwrite flag that restricts this operation.

When scaffolding a project on top of an existing directory, now you will see a WARNING message first that indicates conflicting files in the dest whose content differs to what we are supposed to scaffold. Followed by a prompt asking you to proceed with the overwriting operation.

Once you proceed with the YES, we overwrite those files with the intended content for that particular project.
Proceeding with NO, shows you an ERROR message that recommends using --overwrite argument in CLI.

There are no changes in --force in this PR. So it will behave as it is for now, until we deprecate force. There will be a follow up PR to add the deprecating soon message for force parameter.

Fixes: #163

@shatakshiiii shatakshiiii added the enhancement New feature or request label Oct 1, 2024
@shatakshiiii shatakshiiii self-assigned this Oct 1, 2024
@trishnaguha
Copy link
Member

@shatakshiiii Can we open this PR up for review and merge this please?

@shatakshiiii shatakshiiii marked this pull request as ready for review October 9, 2024 04:02
@shatakshiiii shatakshiiii requested a review from a team as a code owner October 9, 2024 04:02
@shatakshiiii shatakshiiii requested review from ssbarnea, alisonlhart, cidrblock and a team and removed request for a team October 9, 2024 04:02
@shatakshiiii shatakshiiii changed the title Add --overwrite parameter Add --overwrite and no-overwrite parameters to clean-up force functionality Oct 9, 2024
@ssbarnea ssbarnea changed the title Add --overwrite and no-overwrite parameters to clean-up force functionality Add --(no-)overwrite parameters to control override ability Oct 9, 2024
@ssbarnea ssbarnea merged commit 8eb5bcc into ansible:main Oct 9, 2024
17 checks passed
@shatakshiiii shatakshiiii deleted the introduce_overwrite branch October 9, 2024 10:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

RFE: Make creator a little smarter about force
4 participants