function _make_write_project_json

8.0.x make.drush.inc _make_write_project_json(array &$invocations)
7.x make.drush.inc _make_write_project_json(array &$invocations)
master make.drush.inc _make_write_project_json(array &$invocations)

Writes out project data to temporary files.

Parameters

array &$invocations: An array containing projects sorted by thread.

1 call to _make_write_project_json()
make_projects in commands/make/make.drush.inc
Process all projects specified in the make file.

File

commands/make/make.drush.inc, line 640
Drush Make commands.

Code

function _make_write_project_json(array &$invocations) {
  foreach ($invocations as $thread => $info) {
    $projects = $info['options']['projects'];
    unset($invocations[$thread]['options']['projects']);
    $temp_file = drush_tempnam('make_projects');
    file_put_contents($temp_file, json_encode($projects));
    $invocations[$thread]['options']['projects-location'] = $temp_file;
  }
}