diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-01-23 10:09:49 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-01-24 15:40:57 -0500 |
commit | 433dd926cc80a631ae1429e99d814ea877afedbf (patch) | |
tree | c8963e1d154a1c2d6ae47cf648bbd15e53ce2a8a | |
parent | 886ddb27bfbbb52c41690cd29e2ab3ed80bf5450 (diff) | |
download | haskell-wip/windows-cleanup.tar.gz |
gitlab-ci: Fix Windows cleanup command linewip/windows-cleanup
Why is it so hard to delete a directory's contents without deleting the
directory itself in Windows? This will forever remain a mystery.
-rw-r--r-- | .gitlab-ci.yml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d739effaba..2478d0dee6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -407,5 +407,8 @@ cleanup-windows: - set "BUILD_DIR=%BUILD_DIR:/=\%" - echo "Cleaning %BUILD_DIR%" - cd \GitLabRunner - - rmdir /S /Q %BUILD_DIR%/* + # This is way more complicated than it should be: + # See https://stackoverflow.com/questions/1965787 + - del %BUILD_DIR%\* /F /Q + - for /d %%p in (%BUILD_DIR%\*) do rd /Q /S "%%p" - exit /b 0 |