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

Improves how the site output directory is emptied, helping prevent accidental deletion of files #135

Merged
merged 8 commits into from
Jul 2, 2022

Conversation

caendesilva
Copy link
Member

First checks if the configured directory is on the whitelist of safe directories (can be configured using hyde.safe_output_directories, please submit PRs/comments with more ideas for default safe directories!), and asks if the user really wants the directory to be emptied. Defaults to false. Then when it's okay to proceed, the output is emptied using a less nuclear approach to prevent accidental file deletions. Yes, I accidentally deleted my .git directory. And I did so twice. (And the somehow the vendor directory in the CI).

@codecov
Copy link

codecov bot commented Jul 2, 2022

Codecov Report

Merging #135 (8aa2ecd) into master (785131d) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master     #135   +/-   ##
=========================================
  Coverage     99.23%   99.23%           
- Complexity      758      760    +2     
=========================================
  Files            97       97           
  Lines          1964     1969    +5     
=========================================
+ Hits           1949     1954    +5     
  Misses           15       15           
Impacted Files Coverage Δ
...mework/src/Commands/HydeBuildStaticSiteCommand.php 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 785131d...8aa2ecd. Read the comment docs.

@caendesilva caendesilva merged commit 18adbe1 into master Jul 2, 2022
@caendesilva caendesilva deleted the improve-build-directory-purging branch July 2, 2022 17:53
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