Skip to content

Commit c6a2978

Browse files
committed
Revert "Don't run git status on Windows"
This reverts commit bfe72c8.
1 parent 5f8fab2 commit c6a2978

File tree

1 file changed

+10
-17
lines changed

1 file changed

+10
-17
lines changed

etc/scripts/release.hs

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -194,24 +194,17 @@ rules global@Global{..} args = do
194194
releaseCheckDir </> binaryExeFileName %> \out -> do
195195
need [releaseBinDir </> binaryName </> stackExeFileName]
196196

197-
-- Symlinks in the repo cause a spurious git status change notification
198-
-- on Windows, so we don't run this on Windows. Instead we rely on
199-
-- Linux/Mac testing for that.
197+
-- Run "git diff" so we can see what changes exist, in case things fail below
198+
() <- cmd "git diff"
200199

201-
case platformOS of
202-
Windows -> pure ()
203-
_ -> do
204-
-- Run "git diff" so we can see what changes exist, in case things fail below
205-
() <- cmd "git diff"
206-
207-
Stdout dirty <- cmd "git status --porcelain"
208-
when (not gAllowDirty && not (null (trim dirty))) $
209-
error $ concat
210-
[ "Working tree is dirty. Use --"
211-
, allowDirtyOptName
212-
, " option to continue anyway. Output:\n"
213-
, show dirty
214-
]
200+
Stdout dirty <- cmd "git status --porcelain"
201+
when (not gAllowDirty && not (null (trim dirty))) $
202+
error $ concat
203+
[ "Working tree is dirty. Use --"
204+
, allowDirtyOptName
205+
, " option to continue anyway. Output:\n"
206+
, show dirty
207+
]
215208
() <- cmd
216209
[gProjectRoot </> releaseBinDir </> binaryName </> stackExeFileName]
217210
(stackArgs global)

0 commit comments

Comments
 (0)