Skip to content

runcommand.sh: do not replace %ROM% tokens when empty #3550

Description

@twojstaryzdomu

%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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions