Skip to content

Bug Report: export $(dbus-launch) cannot be parsed by bunster #283

@liveqte

Description

@liveqte

Bug Report: export $(dbus-launch) cannot be parsed by bunster

Problem Description
When using the valid shell syntax export $(dbus-launch) inside a script, bunster fails to parse it and throws a syntax error:

a_wrap.sh(2:12): syntax error: unexpected token $(.
Minimal Reproduction Example

8a88b64bbd99:/tmp/bunster$ cat a_wrap.sh 
{
    export $(dbus-launch)
}
8a88b64bbd99:/tmp/bunster$ bunster build 'a_wrap.sh' -o 'w2bun'
a_wrap.sh(2:12): syntax error: unexpected token `$(`.

Expected Behavior

bunster should correctly handle the $(...)

command substitution syntax and compile the script without errors. In standard bash/sh environments, export $(dbus-launch) is valid and executable.

Environment Information

bunster version: bunster version v0.14.0

OS: Alpine Linux

Go version: go1.24.7 linux/amd64

Additional Notes

The $(...) command substitution is part of the POSIX standard and is equivalent to using backticks. It should be supported by bunster’s parser.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions