summaryrefslogtreecommitdiff
path: root/docs/users_guide/compare-flags.py
diff options
context:
space:
mode:
authorGHC GitLab CI <ghc-ci@gitlab-haskell.org>2021-01-21 13:10:36 -0500
committerGHC GitLab CI <ghc-ci@gitlab-haskell.org>2021-01-25 11:27:49 -0500
commit08d8119447a3e17a125f88f2d0aedb51bc64bac7 (patch)
treedb051a6b4c43bb16ea1acf68b6f96b8dd772bc8d /docs/users_guide/compare-flags.py
parent32d9fdef619cc8a047d91541c484b80e1b67b41e (diff)
downloadhaskell-wip/T18761.tar.gz
compare-flags: Strip whitespace from flags read from --show-optionswip/T18761
Otherwise we end up with terminating \r characters on Windows.
Diffstat (limited to 'docs/users_guide/compare-flags.py')
-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 != ''}