From 08d8119447a3e17a125f88f2d0aedb51bc64bac7 Mon Sep 17 00:00:00 2001 From: GHC GitLab CI Date: Thu, 21 Jan 2021 13:10:36 -0500 Subject: compare-flags: Strip whitespace from flags read from --show-options Otherwise we end up with terminating \r characters on Windows. --- docs/users_guide/compare-flags.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'docs/users_guide/compare-flags.py') 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 != ''} -- cgit v1.2.1