Hm, I couldn’t figure it out either...one thing though:
foreach ($resources as $k => $resource) {
$vehicle = $builder->createVehicle($resource,$attributes);
if ($resource->get('pagetitle') == 'Thank You') {
$modx->log(modX::LOG_LEVEL_INFO,'Packaging install script.<br />');
$vehicle->resolve('php',array(
'type' => 'php',
'source' => $sources['build'] . 'install-script.php',
'target' => "return '" . $sources['build'] . "';"
));
}
$builder->putVehicle($vehicle);
}
Are you sure you want that PHP resolver executing for each Resource? That’s execing twice...