Skip to content

Commit 171edc4

Browse files
committed
Add make bash scripts portable
1 parent 782a711 commit 171edc4

File tree

8 files changed

+23
-23
lines changed

8 files changed

+23
-23
lines changed

scripts/clean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euxo pipefail
33

44
uv run isort --profile hug isort/ tests/ scripts/

scripts/docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -ux
33

44
result=0

scripts/done.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euxo pipefail
33

44
./scripts/clean.sh

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euxo pipefail
33

44
uv run cruft check

scripts/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euxo pipefail
33

44
uv run coverage run --parallel -m pytest tests/unit/ -s --ignore=tests/unit/test_deprecated_finders.py

scripts/test_integration.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
set -euxo pipefail
33

44
uv run pytest tests/integration/ -s

tests/unit/test_regressions.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ def bar():
924924

925925
assert (
926926
isort.code(
927-
'''#!/bin/bash
927+
'''#!/usr/bin/env bash
928928
"""My comment
929929
930930
@@ -939,7 +939,7 @@ def bar():
939939
''',
940940
float_to_top=True,
941941
)
942-
== '''#!/bin/bash
942+
== '''#!/usr/bin/env bash
943943
"""My comment
944944
945945
@@ -958,7 +958,7 @@ def bar():
958958

959959
assert (
960960
isort.code(
961-
'''#!/bin/bash
961+
'''#!/usr/bin/env bash
962962
963963
"""My comment
964964
@@ -974,7 +974,7 @@ def bar():
974974
''',
975975
float_to_top=True,
976976
)
977-
== '''#!/bin/bash
977+
== '''#!/usr/bin/env bash
978978
979979
"""My comment
980980
@@ -1171,7 +1171,7 @@ def test_isort_float_to_top_correctly_identifies_single_line_comments_1499():
11711171
"""
11721172
assert (
11731173
isort.code(
1174-
'''#!/bin/bash
1174+
'''#!/usr/bin/env bash
11751175
"""My comment"""
11761176
def foo():
11771177
pass
@@ -1184,7 +1184,7 @@ def bar():
11841184
float_to_top=True,
11851185
)
11861186
== (
1187-
'''#!/bin/bash
1187+
'''#!/usr/bin/env bash
11881188
"""My comment"""
11891189
import a
11901190
@@ -1200,7 +1200,7 @@ def bar():
12001200
)
12011201
assert (
12021202
isort.code(
1203-
"""#!/bin/bash
1203+
"""#!/usr/bin/env bash
12041204
'''My comment'''
12051205
def foo():
12061206
pass
@@ -1213,7 +1213,7 @@ def bar():
12131213
float_to_top=True,
12141214
)
12151215
== (
1216-
"""#!/bin/bash
1216+
"""#!/usr/bin/env bash
12171217
'''My comment'''
12181218
import a
12191219
@@ -1229,7 +1229,7 @@ def bar():
12291229
)
12301230

12311231
assert isort.check_code(
1232-
"""#!/bin/bash
1232+
"""#!/usr/bin/env bash
12331233
'''My comment'''
12341234
import a
12351235

tests/unit/test_ticketed_features.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ def test_float_to_top_should_respect_existing_newlines_between_imports_issue_150
629629
See: https://github.com/PyCQA/isort/issues/1502
630630
"""
631631
assert isort.check_code(
632-
"""#!/bin/bash
632+
"""#!/usr/bin/env bash
633633
'''My comment'''
634634
635635
import a
@@ -640,7 +640,7 @@ def test_float_to_top_should_respect_existing_newlines_between_imports_issue_150
640640
show_diff=True,
641641
)
642642
assert isort.check_code(
643-
"""#!/bin/bash
643+
"""#!/usr/bin/env bash
644644
'''My comment'''
645645
646646
@@ -653,7 +653,7 @@ def test_float_to_top_should_respect_existing_newlines_between_imports_issue_150
653653
)
654654
assert (
655655
isort.code(
656-
"""#!/bin/bash
656+
"""#!/usr/bin/env bash
657657
'''My comment'''
658658
659659
@@ -664,7 +664,7 @@ def test_float_to_top_should_respect_existing_newlines_between_imports_issue_150
664664
float_to_top=True,
665665
add_imports=["import b"],
666666
)
667-
== """#!/bin/bash
667+
== """#!/usr/bin/env bash
668668
'''My comment'''
669669
670670
@@ -677,7 +677,7 @@ def test_float_to_top_should_respect_existing_newlines_between_imports_issue_150
677677

678678
assert (
679679
isort.code(
680-
"""#!/bin/bash
680+
"""#!/usr/bin/env bash
681681
'''My comment'''
682682
683683
@@ -689,7 +689,7 @@ def my_function():
689689
""",
690690
float_to_top=True,
691691
)
692-
== """#!/bin/bash
692+
== """#!/usr/bin/env bash
693693
'''My comment'''
694694
import a
695695
@@ -701,7 +701,7 @@ def my_function():
701701

702702
assert (
703703
isort.code(
704-
"""#!/bin/bash
704+
"""#!/usr/bin/env bash
705705
'''My comment'''
706706
707707
@@ -711,7 +711,7 @@ def my_function():
711711
add_imports=["import os"],
712712
float_to_top=True,
713713
)
714-
== """#!/bin/bash
714+
== """#!/usr/bin/env bash
715715
'''My comment'''
716716
import os
717717

0 commit comments

Comments
 (0)