From ba3ea8d13d67c6715025b6041b7d490c0276a712 Mon Sep 17 00:00:00 2001 From: Hank Wikle Date: Mon, 6 Apr 2026 09:05:06 -0600 Subject: [PATCH 1/2] Fix inconsistent shebang defaults --- lib/pavilion/scriptcomposer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/pavilion/scriptcomposer.py b/lib/pavilion/scriptcomposer.py index 73917866e..a2658e1d9 100755 --- a/lib/pavilion/scriptcomposer.py +++ b/lib/pavilion/scriptcomposer.py @@ -17,10 +17,10 @@ class ScriptComposerError(RuntimeError): class ScriptHeader: """Class to serve as a struct for the script header.""" - def __init__(self, shebang='#!/bin/bash'): + def __init__(self, shebang='#!/usr/bin/bash'): """The header values for a script. :param string shebang: Shell path specification. Typically - '/bin/bash'. default = None. + '/bin/bash'. default = '#!/usr/bin/bash'. """ # Set _shebang so that style_check doesn't complain at the setter block. @@ -61,7 +61,7 @@ def __init__(self, header=None): the variables. :param ScriptHeader header: The header class to use. Defaults to one - that simply adds ``#!/bin/bash`` as the file header. + that simply adds ``#!/usr/bin/bash`` as the file header. """ if header is None: From 942d9f2da99a21c5e0d5572c72b99b8495dcfe63 Mon Sep 17 00:00:00 2001 From: Hank Wikle Date: Mon, 6 Apr 2026 09:49:02 -0600 Subject: [PATCH 2/2] Fix script composer unit test --- test/tests/scriptComposer_tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tests/scriptComposer_tests.py b/test/tests/scriptComposer_tests.py index 734785d8d..05995c0b2 100644 --- a/test/tests/scriptComposer_tests.py +++ b/test/tests/scriptComposer_tests.py @@ -50,7 +50,7 @@ def test_script_composer(self): # Testing initialization defaults. composer = scriptcomposer.ScriptComposer() - self.assertEqual(composer.header.shebang, '#!/bin/bash') + self.assertEqual(composer.header.shebang, '#!/usr/bin/bash') # Testing individual assignment test_header_shell = "/usr/env/python" @@ -67,7 +67,7 @@ def test_script_composer(self): composer = scriptcomposer.ScriptComposer() - self.assertEqual(composer.header.shebang, '#!/bin/bash') + self.assertEqual(composer.header.shebang, '#!/usr/bin/bash') # Testing object assignment. header = scriptcomposer.ScriptHeader(