Skip to content

Commit

Permalink
Fix #3797 (Windows 10: re git submodule usage)
Browse files Browse the repository at this point in the history
Commit 8bda49d introduced the `git submodule` command into `Pantry.Repo.getRepo'`. Tests suggest that, on Windows 10, this suffers from the same upstream bug as `git clone` (see #3992 (comment) .)

This pull request proposes the same 'fix'; on Windows 10, re-enable ANSI capability after the `git submodule` command is used.

Tests on Windows 10 suggest the fix works as intended.
  • Loading branch information
mpilgrem committed Oct 1, 2018
1 parent a299ac6 commit 61dae3c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions subs/pantry/src/Pantry/Repo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ getRepo' repo@(Repo url commit repoType' subdir) pm =
withWorkingDir dir $ do
runCommand resetArgs
traverse_ runCommand submoduleArgs
-- On Windows 10, an upstream issue with the `git submodule` command means
-- that command clears, but does not then restore, the
-- ENABLE_VIRTUAL_TERMINAL_PROCESSING flag for native terminals. The
-- folowing hack re-enables the lost ANSI-capability.
when osIsWindows $ void $ liftIO $ hSupportsANSIWithoutEmulation stdout
runCommand archiveArgs
abs' <- resolveFile' tarball
getArchive
Expand Down

0 comments on commit 61dae3c

Please sign in to comment.