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-27 23:30:00 -0500 |
commit | 6da9f4c8df7a216234ef50104e400cdcbfbc1bd4 (patch) | |
tree | 321c9d22cb360db731808e71cba88b77fb4df83c | |
parent | f8605fa2b36bb7ff462ce9b12d1dbf23c9503f00 (diff) | |
download | haskell-6da9f4c8df7a216234ef50104e400cdcbfbc1bd4.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.
-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 |