RetroPie / RetroPie/RetroPie-Setup
runcommand.sh: do not replace %ROM% tokens when empty
Open
Nobody has claimed this yet.
- Dominant language
- Shell
- Stars
- 10.4k
- Forks
- 1.4k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 11
Description
%ROM% appears to be quoted for no reason when empty.
I'm creating custom ports as follows:
addPort "${md_id}-${part}" "${md_id}-${part}" "Default game ${part}" "pushd $datadir; $bindir/binary %ROM%; popd"
...
addPort "${md_id}-${part}" "${md_id}-${part}" "Game ${part} level ${file}" "pushd $datadir; $bindir/binary %ROM%; popd" "$file"
The binary is treating the quoting as input and fails to run. runcommand.log output:
pushd <datadir> /usr/bin/binary ""; popd
<datadir> /
error loading file ""
If there isn't a ROM provided, it makes no sense to quote it.
Contributor guide
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 in runcommand.sh and trace how the %ROM% token is replaced for the two addPort command forms shown. Reproduce the empty-ROM case from the issue and compare it with the populated-ROM case. Done means an empty ROM is not passed as a quoted empty argument, while a provided ROM still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100