diff options
author | Ben Gamari <ben@smart-cactus.org> | 2019-01-23 10:09:49 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-02-20 14:28:54 -0500 |
commit | 31a3dc43f9c6278210964988f09601f625af738a (patch) | |
tree | 4a9355bddcdb56b45db16dc59a8b39a431e54581 /.gitlab-ci.yml | |
parent | 805681e816a8677e341144d596d65edd29866246 (diff) | |
download | haskell-31a3dc43f9c6278210964988f09601f625af738a.tar.gz |
gitlab-ci: Fix Windows cleanup command line
Why is it so hard to delete a directory's contents without deleting the
directory itself in Windows? This will forever remain a mystery.
(cherry picked from commit 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4)
Diffstat (limited to '.gitlab-ci.yml')
-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 |