diff options
author | Florian Bruhin <me@the-compiler.org> | 2022-04-02 12:45:40 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2022-04-02 12:45:40 +0200 |
commit | f7bf9d0c33f5095ba532373fa795661bb4d03cff (patch) | |
tree | b357b699c7ffe6452673cc57e3b8a8df26aa45db | |
parent | 01a402dcfc76c24d872a6d6021decc4c1542e197 (diff) | |
download | qutebrowser-f7bf9d0c33f5095ba532373fa795661bb4d03cff.tar.gz qutebrowser-f7bf9d0c33f5095ba532373fa795661bb4d03cff.zip |
Mark qute-pass as executable and add checker
Regressed in #7068
-rw-r--r-- | scripts/dev/misc_checks.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/dev/misc_checks.py b/scripts/dev/misc_checks.py index 37c59d98f..05fdb7932 100644 --- a/scripts/dev/misc_checks.py +++ b/scripts/dev/misc_checks.py @@ -337,7 +337,7 @@ def check_userscripts_descriptions(_args: argparse.Namespace = None) -> bool: def check_userscript_shebangs(_args: argparse.Namespace) -> bool: - """Check that we're using /usr/bin/env in shebangs.""" + """Check that we're using /usr/bin/env in shebangs and scripts are executable.""" ok = True folder = pathlib.Path('misc/userscripts') @@ -345,6 +345,10 @@ def check_userscript_shebangs(_args: argparse.Namespace) -> bool: if sub.is_dir() or sub.name == 'README.md': continue + if not os.access(sub, os.X_OK): + print(f"{sub} is not marked as executable") + ok = False + with sub.open('r', encoding='utf-8') as f: shebang = f.readline().rstrip('\n') assert shebang.startswith('#!'), shebang |