-
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(more_space): Windows path handling in cleanup script #67
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
fix(more_space): Windows path handling in cleanup script #67
Conversation
Updated safe_remove to use Unix-style paths for directory checks and messages, improving compatibility on Windows systems.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #67 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 819 819
Branches 82 82
=========================================
Hits 819 819
Flags with carried forward coverage won't be shown. Click here to find out more. |
Converts ANDROID_HOME to a Unix path before removal to ensure safe and consistent deletion. This prevents potential issues with path formats on different platforms.
bec9b9f to
83f708c
Compare
Before removing directories on Windows, the script now outputs their size for debugging purposes. After attempting removal, it verifies whether the directory was successfully deleted and prints a corresponding message.
Updated the cleanup.sh script to convert Unix paths to Windows format using cygpath before passing them to PowerShell, ensuring accurate directory size calculation on Windows systems.
Eliminates the verification step that checked if a directory still existed after removal. Adds a delay for Windows systems to allow the filesystem to update after deletion.
af0e489 to
214e10e
Compare
Switches to using PowerShell's Remove-Item for directory removal on Windows, providing more reliable handling of Windows paths. Retains rm -rf for Unix systems and adds logic to convert paths for PowerShell when cygpath is available.
Enhanced the safe_remove function to use PowerShell's -LiteralPath for better handling of special characters and added a fallback to cmd.exe rd if removal fails. Also added progress messages and verification to ensure directories are properly deleted.
Removes pre-removal size check and fallback deletion logic for Windows directories in safe_remove(). Now uses a single PowerShell command for removal, streamlining the process.
Revised the expected space savings values for various cleanup options across different OS environments in the README. This update reflects more accurate or recent measurements for Windows runners and other minor adjustments.
|



Description
Updated safe_remove to use Unix-style paths for directory checks and messages, improving compatibility on Windows systems.
TODO:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage