From 6a416eb590be978a2ad25c610974fdde84e88651 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Wed, 15 Nov 2023 20:05:35 +0000 Subject: [PATCH] cvise.py: call shell vial `/usr/bin/env` indirection instead of `/bin` My system (`NixOS`) has one well-defined shell: `/bin/sh`. But normally programs use either `/run/current-system/sw/bin/bash` or the `bash` from `PATH`. They use `/usr/bin/env` for that. The change calls shell via `/usr/bin/env` to use `PATH` lookup. --- cvise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cvise.py b/cvise.py index bb4ef55c..9b46c664 100755 --- a/cvise.py +++ b/cvise.py @@ -291,7 +291,7 @@ def get_available_cores(): script = None if args.commands: with tempfile.NamedTemporaryFile(mode='w', delete=False, suffix='.sh') as script: - script.write(f'#!/bin/{args.shell}\n\n') + script.write(f'#!/usr/bin/env {args.shell}\n\n') script.write(args.commands + '\n') os.chmod(script.name, 0o744) logging.info('Using temporary interestingness test: %s' % script.name)