Fixed Empty build.json will prevent add-on from being built

Naz

XenForo developer
Staff member
Affected version
2.1
As title. A build.json like this:

Code:
{

}

...will cause an error when trying to build an add-on.

Code:
In ReleaseBuilder.php line 247:
                                                          
  [XF\PrintableException]                                 
  Cannot build add-on due to build.json error: No error.


Exception trace:
Code:
XF\Service\AddOn\ReleaseBuilder->performBuildTasks() at /Users/nix/Sites/xf21x/src/XF/Service/AddOn/ReleaseBuilder.php:387
 XF\Service\AddOn\ReleaseBuilder->build() at /Users/nix/Sites/xf21x/src/XF/Cli/Command/AddOn/BuildRelease.php:84
 XF\Cli\Command\AddOn\BuildRelease->execute() at /Users/nix/Sites/xf21x/src/vendor/symfony/console/Command/Command.php:255
 Symfony\Component\Console\Command\Command->run() at /Users/nix/Sites/xf21x/src/vendor/symfony/console/Application.php:946
 Symfony\Component\Console\Application->doRunCommand() at /Users/nix/Sites/xf21x/src/vendor/symfony/console/Application.php:248
 Symfony\Component\Console\Application->doRun() at /Users/nix/Sites/xf21x/src/vendor/symfony/console/Application.php:148
 Symfony\Component\Console\Application->run() at /Users/nix/Sites/xf21x/src/XF/Cli/Runner.php:63
 XF\Cli\Runner->run() at /Users/nix/Sites/xf21x/cmd.php:15
 
Thank you for reporting this issue. The issue is now resolved and we are aiming to include that in a future XF release (2.0.12).

Change log:
When building a release and testing a JSON, only consider an error if decoding the build.json does not return an array.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom