-
Notifications
You must be signed in to change notification settings - Fork 7.1k
[vcpkg] Harden file removals and clean directory contents in "CI" inside vcpkg itself. #11432
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
Conversation
…ide vcpkg itself. files.h/files.cpp: * Add end and else comments to all macros. * Add "remove_all_inside" function which empties a directory without actually deleting the directory. This is necessary to handle the case where the directory is actually a directory symlink. * Change remove_all to use std::remove when VCPKG_USE_STD_FILESYSTEM is set; this will engage POSIX delete support available on current Win10. commands.ci.cpp: empty "installed", "packages", and "buildtrees". */initialize_environment.*: No longer clean the directories outside the tool. * ci-step.ps1: Remove unused console output tee-ing.
…leaned down the line. Test that the installed directory is a directory before attempting to clean.
@@ -4,29 +4,20 @@ | |||
|
|||
# Sets up the environment for MacOS runs of vcpkg CI | |||
|
|||
rm -rf installed || true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this okay? Don't we still need to remove this before vcpkg ci
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this change makes the ci command itself do that: https://github.com/microsoft/vcpkg/pull/11432/files#diff-2b467942d4ff71ffedfb2c0396ee333dR401
…ide vcpkg itself. (microsoft#11432) `files.h/files.cpp`: * Add end and else comments to all macros. * Add "remove_all_inside" function which empties a directory without actually deleting the directory. This is necessary to handle the case where the directory is actually a directory symlink. * Change remove_all to use std::remove when VCPKG_USE_STD_FILESYSTEM is set; this will engage POSIX delete support available on current Win10. `commands.ci.cpp`: empty "installed". `*/initialize_environment.*`: No longer clean the directories outside the tool. `ci-step.ps1`: Remove unused console output tee-ing.
files.h/files.cpp
:commands.ci.cpp
: empty "installed".*/initialize_environment.*
: No longer clean the directories outside the tool.ci-step.ps1
: Remove unused console output tee-ing.Fixes #11395 (hopefully)