diff options
author | GHC GitLab CI <ghc-ci@gitlab-haskell.org> | 2021-01-21 13:10:36 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2021-01-26 09:49:55 -0500 |
commit | df7b2cce70fca3b18457ada1c973874dcc03e717 (patch) | |
tree | 62c3a4c2503230222087f62cc8f01297bd6517ab | |
parent | 37fbdd6f56ca1be57d9438c2e9aaf03416c38ed9 (diff) | |
download | haskell-df7b2cce70fca3b18457ada1c973874dcc03e717.tar.gz |
compare-flags: Strip whitespace from flags read from --show-options
Otherwise we end up with terminating \r characters on Windows.
(cherry picked from commit 08d8119447a3e17a125f88f2d0aedb51bc64bac7)
-rwxr-xr-x | docs/users_guide/compare-flags.py | 4 |
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 != ''} |