run.sh / run-helper.sh.template uses "$*" instead of "$@"
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 1.4k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 24
Description
Describe the bug
run.sh has lines like
"$DIR"/run-helper.sh $* &
and the run-helper.sh.template has lines like
"$DIR"/bin/Runner.Listener run $*
In both of these files, they assume that anything passed is a single string/line instead of an array. Additionally, it's not quoted. If one does
command: ["/home/runner/run.sh", "a", "b", "c d"]
such as in a kubernetes/self-hosted set up, you will have issues with passing them through to the nested command inside the helper template.
Expected behavior
I suspect one needs to be using "$@" safely to properly pass arguments through, but also not entirely clear how one expects to pass arguments through to the nested template unless one expects end users to modify it?
Runner Version and Platform
RUNNER_VERSION=2.329.0
OS of the machine running the runner? OSX/Windows/Linux/...
Linux, Almalinux9
What's not working?
runner@a8fd96b82a62:~$ /home/runner/run.sh --name "FAKE NAME"
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY)
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known directory 'Bin': '/home/runner/bin'
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known directory 'Root': '/home/runner'
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known config file 'Credentials': '/home/runner/.credentials'
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known directory 'Bin': '/home/runner/bin'
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known directory 'Root': '/home/runner'
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known config file 'Runner': '/home/runner/.runner'
[RUNNER 2025-11-20 21:35:17Z INFO Listener] Runner is built for Linux (X64) - linux-x64.
[RUNNER 2025-11-20 21:35:17Z INFO Listener] RuntimeInformation: Ubuntu 22.04.5 LTS.
[RUNNER 2025-11-20 21:35:17Z INFO Listener] Version: 2.330.0
[RUNNER 2025-11-20 21:35:17Z INFO Listener] Commit: e2088f1fc730f9e857bec485223b090ef0e3cb87
[RUNNER 2025-11-20 21:35:17Z INFO Listener] Culture:
[RUNNER 2025-11-20 21:35:17Z INFO Listener] UI Culture:
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known directory 'Bin': '/home/runner/bin'
[RUNNER 2025-11-20 21:35:17Z INFO HostContext] Well known directory 'Root': '/home/runner'
[RUNNER 2025-11-20 21:35:17Z INFO Listener] Validating directory permissions for: '/home/runner'
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] Parse
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] Parsing 4 args
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] parsing argument
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] HasArgs: False
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] Adding Command: run
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] parsing argument
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] HasArgs: True
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] arg: name
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] parsing argument
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] HasArgs: True
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] Adding option 'name': 'FAKE'
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] parsing argument
[RUNNER 2025-11-20 21:35:17Z INFO CommandLineParser] HasArgs: True
[RUNNER 2025-11-20 21:35:17Z INFO Listener] Arguments parsed
compare to
runner@a8fd96b82a62:~$ .//bin/Runner.Listener --name "FAKE NAME"
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] No proxy settings were found based on environmental variables (http_proxy/https_proxy/HTTP_PROXY/HTTPS_PROXY)
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known directory 'Bin': '/home/runner/bin'
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known directory 'Root': '/home/runner'
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known config file 'Credentials': '/home/runner/.credentials'
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known directory 'Bin': '/home/runner/bin'
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known directory 'Root': '/home/runner'
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known config file 'Runner': '/home/runner/.runner'
[RUNNER 2025-11-20 21:35:55Z INFO Listener] Runner is built for Linux (X64) - linux-x64.
[RUNNER 2025-11-20 21:35:55Z INFO Listener] RuntimeInformation: Ubuntu 22.04.5 LTS.
[RUNNER 2025-11-20 21:35:55Z INFO Listener] Version: 2.330.0
[RUNNER 2025-11-20 21:35:55Z INFO Listener] Commit: e2088f1fc730f9e857bec485223b090ef0e3cb87
[RUNNER 2025-11-20 21:35:55Z INFO Listener] Culture:
[RUNNER 2025-11-20 21:35:55Z INFO Listener] UI Culture:
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known directory 'Bin': '/home/runner/bin'
[RUNNER 2025-11-20 21:35:55Z INFO HostContext] Well known directory 'Root': '/home/runner'
[RUNNER 2025-11-20 21:35:55Z INFO Listener] Validating directory permissions for: '/home/runner'
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] Parse
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] Parsing 2 args
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] parsing argument
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] HasArgs: True
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] arg: name
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] parsing argument
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] HasArgs: True
[RUNNER 2025-11-20 21:35:55Z INFO CommandLineParser] Adding option 'name': 'FAKE NAME'
[RUNNER 2025-11-20 21:35:55Z INFO Listener] Arguments parsed
[RUNNER 2025-11-20 21:35:55Z INFO Runner] ExecuteCommand
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading run.sh and run-helper.sh.template, then reproduce the issue with /home/runner/run.sh --name "FAKE NAME" and compare it with the direct Runner.Listener invocation shown. Done means arguments containing spaces and multiple separate arguments reach the nested runner command without being split or merged unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100