Skip to content

Commit

Permalink
Mention the proper env vars for usage in MinGW
Browse files Browse the repository at this point in the history
  • Loading branch information
jasagredo authored and Bodigrim committed Jan 2, 2024
1 parent ead27c2 commit c7396fa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -820,9 +820,12 @@ Use `sequentialTestGroup` to mitigate these problems.

3. **Q**: Patterns with slashes do not work on Windows. How can I fix it?

**A**: If you are running Git for Windows terminal, it has a habit of converting slashes
to backslashes. Set `MSYS_NO_PATHCONV=1` to prevent this behaviour, or follow other
suggestions from [Known Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues).
**A**: If you are running Git for Windows terminal, it has a habit of
converting slashes to backslashes. Set `MSYS_NO_PATHCONV=1` when running the
Git for Windows terminal and `MSYS2_ARG_CONV_EXCL=*` when running a MinGW
bash directly to prevent this behaviour, or follow other suggestions from
[Known
Issues](https://github.com/git-for-windows/build-extra/blob/main/ReleaseNotes.md#known-issues).

## Press

Expand Down
10 changes: 9 additions & 1 deletion core/Test/Tasty/Patterns.hs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,15 @@ instance IsOption TestPattern where
defaultValue = noPattern
parseValue = parseTestPattern
optionName = return "pattern"
optionHelp = return "Select only tests which satisfy a pattern or awk expression"
#if !defined(mingw32_HOST_OS)
optionHelp = return "Select only tests which satisfy a pattern or awk expression."
#else
optionHelp = return
$ unwords [ "Select only tests which satisfy a pattern or awk expression."
, "Consider using `MSYS_NO_PATHCONV=1` or `MSYS2_ARG_CONV_EXCL=*`"
, "to prevent pattern mangling."
]
#endif
optionCLParser =
fmap (TestPattern . fmap (foldr1 And) . nonEmpty . catMaybes . coerce @[TestPattern]) . some $
mkOptionCLParser (short 'p' <> metavar "PATTERN")
Expand Down

0 comments on commit c7396fa

Please sign in to comment.