summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGHC GitLab CI <ghc-ci@gitlab-haskell.org>2021-01-21 13:10:36 -0500
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-01-30 14:12:24 -0500
commit73fa75f5a96d515e22069233e894eac3c53a3d6d (patch)
treed8d028d769d1daf083318ea63bec4e052ef7eb07
parent55ef3bdc28681a22ceccf207707c49229f9b7559 (diff)
downloadhaskell-73fa75f5a96d515e22069233e894eac3c53a3d6d.tar.gz
compare-flags: Strip whitespace from flags read from --show-options
Otherwise we end up with terminating \r characters on Windows.
-rwxr-xr-xdocs/users_guide/compare-flags.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/users_guide/compare-flags.py b/docs/users_guide/compare-flags.py
index 5f0a1c9741..81a11b90e5 100755
--- a/docs/users_guide/compare-flags.py
+++ b/docs/users_guide/compare-flags.py
@@ -49,8 +49,8 @@ def read_documented_flags(doc_flags) -> Set[str]:
def read_ghc_flags(ghc_path: str) -> Set[str]:
ghc_output = subprocess.check_output([ghc_path, '--show-options'])
- return {flag
- for flag in ghc_output.decode('UTF-8').split('\n')
+ flags = {flag.strip() for flag in ghc_output.decode('UTF-8').split('\n')}
+ return {flag for flag in flags
if not expected_undocumented(flag)
if flag != ''}