Skip to content

Commit bbcdb5a

Browse files
committed
shellcheck_run_steps: prefix tmpfile with main package name
For easier debugging. Signed-off-by: dann frazier <dann.frazier@chainguard.dev>
1 parent 43bce5e commit bbcdb5a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

pre_commit_hooks/shellcheck_run_steps.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def do_shellcheck(
4949
if "test" in pkg.keys():
5050
test_pipeline = pkg["test"].get("pipeline", [])
5151
pipelines.extend(test_pipeline)
52+
name = melange_cfg["package"]["name"]
5253
all_run_files = []
5354
with contextlib.ExitStack() as stack:
5455
for step in pipelines:
@@ -59,6 +60,7 @@ def do_shellcheck(
5960
stack.enter_context(
6061
tempfile.NamedTemporaryFile(
6162
mode="w",
63+
prefix=name,
6264
dir=os.getcwd(),
6365
delete_on_close=False,
6466
),

0 commit comments

Comments
 (0)