From f5087d84a19380bb08cdcba365cc9fadff9adc41 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 28 May 2015 11:38:31 -0700
Subject: [PATCH] More fixes to make-windows-installer for #2187.

---
 windows/make-windows-installer.bat | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/windows/make-windows-installer.bat b/windows/make-windows-installer.bat
index 5e574c9db..5b0e7f567 100644
--- a/windows/make-windows-installer.bat
+++ b/windows/make-windows-installer.bat
@@ -6,7 +6,8 @@ cabal clean
 cabal install hsb2hs
 if %errorlevel% neq 0 exit /b %errorlevel%
 REM We do it once to regenrate data/reference.docx/odt
-cabal install -v1 --force --reinstall --flags="embed_data_files"
+cabal install -v1 --force --reinstall
+cabal clean
 REM then again for real, because otherwise it won't work with embed_data_files:
 cabal install -v1 --force --reinstall --flags="embed_data_files" . pandoc-citeproc
 if %errorlevel% neq 0 exit /b %errorlevel%