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

[11.x] Add overwrite confirmation to environment encryption commands #54390

Closed
wants to merge 2 commits into from

Conversation

dxnter
Copy link

@dxnter dxnter commented Jan 28, 2025

Adding minor improvements to both the env:encrypt and env:decrypt commands that prompt the user if they would like to overwrite the existing decrypted/encrypted environment file in the absence of the --force option.

This pull request also resolves a minor misalignment in EnvironmentDecryptCommandTest, where the assertions being made in testItFailsWhenEncryptionFileCannotBeFound() and testItFailsWhenEnvironmentFileExists() were incorrectly interchanged.

@taylorotwell
Copy link
Member

I think this is OK for now as it remains consistent with the other generation commands.

@dxnter
Copy link
Author

dxnter commented Jan 28, 2025

@taylorotwell Understandable, this was mostly inspired by how options are handled in:

From a user's perspective, I do think having a confirmation presented in certain circumstances is a nice QoL improvement instead of them being required to re-run commands with different arguments and options. To your point, that is something that should be consistent with other file generation commands:

If a PR would be welcomed to additionally make those changes for consistency, I could do so.

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