diff options
| author | Billy O'Neal <bion@microsoft.com> | 2020-06-08 22:46:18 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-08 22:46:18 -0700 |
| commit | 1d3e985e4f1b0d52adf1a8eba7a4c0a092938cfb (patch) | |
| tree | 78da83892364778a2344ec7bae1bb565add289d9 /toolsrc/src | |
| parent | cb8a9fe7157f8ad2423742f893955ed9ced05910 (diff) | |
| download | vcpkg-1d3e985e4f1b0d52adf1a8eba7a4c0a092938cfb.tar.gz vcpkg-1d3e985e4f1b0d52adf1a8eba7a4c0a092938cfb.zip | |
[vcpkg] Fix OSX CI by ensuring the downloads directory exists (#11839)
* [vcpkg] Remove do-nothing Set-Content from Windows azure-pipelines.yml.
* [vcpkg] Fix OSX CI by ensuring the downloads directory exists in advance, and extract common command line parameters with powershell splatting.
* [tensorflow-cc] Prevent hang building tensorflow-cc asking to configure iOS.
* Skip ignition-msgs5:x64-osx
Diffstat (limited to 'toolsrc/src')
| -rw-r--r-- | toolsrc/src/vcpkg/commands.ciclean.cpp | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/toolsrc/src/vcpkg/commands.ciclean.cpp b/toolsrc/src/vcpkg/commands.ciclean.cpp index 9c69d1931..74b9b35ab 100644 --- a/toolsrc/src/vcpkg/commands.ciclean.cpp +++ b/toolsrc/src/vcpkg/commands.ciclean.cpp @@ -2,31 +2,39 @@ #include <vcpkg/base/checks.h>
#include <vcpkg/base/files.h>
+#include <vcpkg/base/system.print.h>
#include <vcpkg/commands.h>
#include <vcpkg/vcpkgcmdarguments.h>
using namespace vcpkg;
-namespace vcpkg::Commands::CIClean
-{
- void perform_and_exit(const VcpkgCmdArguments&, const VcpkgPaths& paths)
+namespace {
+ void clear_directory(Files::Filesystem& fs, const fs::path& target)
{
- auto& fs = paths.get_filesystem();
- if (fs.is_directory(paths.buildtrees))
+ using vcpkg::System::print2;
+ if (fs.is_directory(target))
{
- fs.remove_all_inside(paths.buildtrees, VCPKG_LINE_INFO);
+ print2("Clearing contents of ", target.u8string(), "\n");
+ fs.remove_all_inside(target, VCPKG_LINE_INFO);
}
-
- if (fs.is_directory(paths.installed))
- {
- fs.remove_all_inside(paths.installed, VCPKG_LINE_INFO);
- }
-
- if (fs.is_directory(paths.packages))
+ else
{
- fs.remove_all_inside(paths.packages, VCPKG_LINE_INFO);
+ print2("Skipping clearing contents of ", target.u8string(), " because it was not a directory\n");
}
+ }
+}
+namespace vcpkg::Commands::CIClean
+{
+ void perform_and_exit(const VcpkgCmdArguments&, const VcpkgPaths& paths)
+ {
+ using vcpkg::System::print2;
+ auto& fs = paths.get_filesystem();
+ print2("Starting vcpkg CI clean\n");
+ clear_directory(fs, paths.buildtrees);
+ clear_directory(fs, paths.installed);
+ clear_directory(fs, paths.packages);
+ print2("Completed vcpkg CI clean\n");
Checks::exit_success(VCPKG_LINE_INFO);
}
}
|
