XF 2.3.4 sh: syntax error: unexpected '(' when: Using build.json exec and a bracket in the plugin name

tenants

Well-known member
Affected version
v2.3.4
Low priority, this wont be noticed by frontend users, only people that create plugins may notice the when doing:

php cmd.php xf-addon:build-release
and using a build.json file with exec


If your plugin name has brackets in it you will get:
sh: syntax error: unexpected "("


This occurs in the following file:
ReleaseBuilderService PerformBuildTasks: $this->execCmds($buildJson['exec']);

Work around: rename your plugin and take out the brackets

Code:
my build.json file:
{
    "additional_files": [
        "js/tenants/adminextra/core_handlers_extra.js"
    ],
    "exec": [
        "echo '{title} version {version_string} ({version_id}) has been built successfully!!' > '/var/www/html/forum/src/addons/Tenants/AdminExtras/build_output.txt'"
    ]
}

my plugin name: Tenants/ToolsAdmin - Administrate your (non forum) site tools
 
Last edited:
In the database xenforo_db.xf_addon;
I change the plugin name from:
Tenants/ToolsAdmin - Administrate your (non forum) site tools
to
Tenants/ToolsAdmin - Administrate your non forum site tools

And the issue went away, so I'm certain it's a core bug
 
Back
Top Bottom