Not working with Drupal 8 YML Format

Issue #36 new
Ursin Cola created an issue

Hi all

Drupal 8 is working with YML format, so that the solution is not working (patches.make).

You need to change the patches.make format. Replace this function int patchfile.drush.inc and it wil work (sorry i have right now no patch file created for this)

function _drush_patchfile_add_patch($project_name, $patch_url, $file) { $result = yaml_parse_file($file); $is_new = TRUE; if (isset($result['projects'])) { if (isset($result['projects'][$project_name])) { if (isset($result['projects'][$project_name]['patch'])) { if (in_array($patch_url, $result['projects'][$project_name]['patch'])) { $is_new = FALSE; } } } }

if ($is_new) { $result['projects'][$project_name]['patch'][] = $patch_url; }

$return = yaml_emit_file($file, $result); if ($return) { drush_log(dt('Added patch @patch to @project in @file.', array('@patch' => $patch_url, '@project' => $project_name, '@file' => $file)), 'success'); return TRUE; } else { return drush_set_error('DRUSH_MAKE_FILE_NO_WRITE', dt('Unable to append to file @file.', array('@file' => $file))); } }

Comments (0)

  1. Log in to comment