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

DXCDT-508: Prevent overwriting already existing files #798

Merged
merged 4 commits into from
Aug 10, 2023

Conversation

sergiught
Copy link
Contributor

@sergiught sergiught commented Aug 10, 2023

🔧 Changes

Adds a check to ensure the output dir is empty, if it's not it prompts the user to proceed in overwriting the files.

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@codecov-commenter
Copy link

codecov-commenter commented Aug 10, 2023

Codecov Report

Patch coverage: 73.33% and project coverage change: +0.01% 🎉

Comparison is base (fc3ba6e) 71.98% compared to head (a2765d5) 72.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #798      +/-   ##
==========================================
+ Coverage   71.98%   72.00%   +0.01%     
==========================================
  Files          91       91              
  Lines       11405    11447      +42     
==========================================
+ Hits         8210     8242      +32     
- Misses       2691     2700       +9     
- Partials      504      505       +1     
Files Changed Coverage Δ
internal/cli/terraform.go 61.86% <73.33%> (+3.10%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sergiught sergiught marked this pull request as ready for review August 10, 2023 10:22
@sergiught sergiught requested a review from a team as a code owner August 10, 2023 10:22
@sergiught sergiught force-pushed the feature/DXCDT-508-check-file-exists branch 2 times, most recently from bd54da2 to 296e486 Compare August 10, 2023 10:38
outputDIR,
)

if !cli.force && !cli.noInput {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use canPrompt(cmd)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

1d19261 (#798) Updated!

@sergiught sergiught force-pushed the feature/DXCDT-505-terraform-exec branch from a3bb523 to fbe8d5e Compare August 10, 2023 16:12
Base automatically changed from feature/DXCDT-505-terraform-exec to main August 10, 2023 16:30
@sergiught sergiught force-pushed the feature/DXCDT-508-check-file-exists branch from d90d266 to 1d19261 Compare August 10, 2023 16:37
@sergiught sergiught merged commit 26044a2 into main Aug 10, 2023
6 checks passed
@sergiught sergiught deleted the feature/DXCDT-508-check-file-exists branch August 10, 2023 18:04
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.

3 participants