Skip to content

Remove repetition of shell command in log#5195

Open
Flamefire wants to merge 2 commits into
easybuilders:developfrom
Flamefire:shell-cmd-output-shorting
Open

Remove repetition of shell command in log#5195
Flamefire wants to merge 2 commits into
easybuilders:developfrom
Flamefire:shell-cmd-output-shorting

Conversation

@Flamefire

Copy link
Copy Markdown
Contributor

Only mention the command once to avoid cluttering the log. Also moves the command around, i.e. not "foo shell command" but "shell command foo"

Result:

== 2026-06-11 11:15:57,014 run.py:486 INFO run_shell_cmd: Script to start debug shell for shell command 'echo ...'
will be saved to /tmp/eb-sqv44xur/eb-jt25_0o7/eb-8cg0xkof/eb-tbmdi883/run-shell-cmd-output/echo-nwcdoh/cmd.sh
output will be logged to /tmp/eb-sqv44xur/eb-jt25_0o7/eb-8cg0xkof/eb-tbmdi883/run-shell-cmd-output/echo-nwcdoh/out.txt
== 2026-06-11 11:15:57,015 run.py:512 INFO Path to bash that will be used to run shell commands: /usr/bin/bash
== 2026-06-11 11:15:57,015 run.py:526 INFO Running shell command in /home/alex/git/easybuild-framework:
echo hello
== 2026-06-11 11:16:04,875 run.py:645 INFO Shell command completed successfully
Output (stdout + stderr):
hello

This allows to find it more easily by grepping for e.g. "Running shell command" and avoids repeating the same command multiple times which makes it harder to find the actual command

@Flamefire Flamefire force-pushed the shell-cmd-output-shorting branch from 81c1661 to 73bac61 Compare June 11, 2026 09:20
Only mention the command once to avoid cluttering the log.
Also moves the command around, i.e. not "foo shell command" but "shell command foo"

Result:
> == 2026-06-11 10:59:59,270 run.py:486 INFO run_shell_cmd: Script to start debug shell for shell command 'echo ...'
> 	will be saved to /tmp/eb-a0hz36a8/eb-481rmksq/eb-8t3f24id/eb-ncfim2n4/run-shell-cmd-output/echo-c03bkciy/cmd.sh
> 	output will be logged to /tmp/eb-a0hz36a8/eb-481rmksq/eb-8t3f24id/eb-ncfim2n4/run-shell-cmd-output/echo-c03bkciy/out.txt
> == 2026-06-11 10:59:59,271 run.py:512 INFO Path to bash that will be used to run shell commands: /usr/bin/bash
> == 2026-06-11 10:59:59,271 run.py:526 INFO Running shell command in /home/alex/git/easybuild-framework:
> 	echo hello
> == 2026-06-11 10:59:59,276 run.py:645 INFO Shell command 'echo ...' completed successfully
> Output (stdout + stderr):
> hello
>
>
The cmd does not need to be mentioned when it directly follows the full command:

> == 2026-06-11 11:15:57,014 run.py:486 INFO run_shell_cmd: Script to start debug shell for shell command 'echo ...'
> 	will be saved to /tmp/eb-sqv44xur/eb-jt25_0o7/eb-8cg0xkof/eb-tbmdi883/run-shell-cmd-output/echo-_nwcdoh_/cmd.sh
> 	output will be logged to /tmp/eb-sqv44xur/eb-jt25_0o7/eb-8cg0xkof/eb-tbmdi883/run-shell-cmd-output/echo-_nwcdoh_/out.txt
> == 2026-06-11 11:15:57,015 run.py:512 INFO Path to bash that will be used to run shell commands: /usr/bin/bash
> == 2026-06-11 11:15:57,015 run.py:526 INFO Running shell command in /home/alex/git/easybuild-framework:
> 	echo hello
> == 2026-06-11 11:16:04,875 run.py:645 INFO Shell command completed successfully
> Output (stdout + stderr):
> hello
@Flamefire Flamefire force-pushed the shell-cmd-output-shorting branch from 73bac61 to 1eeefde Compare June 11, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant