Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[yaml:merge] command requires target file to exist before merging #3228

Closed
freelock opened this issue Mar 15, 2017 · 0 comments
Closed

[yaml:merge] command requires target file to exist before merging #3228

freelock opened this issue Mar 15, 2017 · 0 comments
Assignees
Labels

Comments

@freelock
Copy link

Problem/Motivation

When using drupal yaml:merge target.yml source1.yml source2.ytml, target.yml is supposed to get the merged yaml from the remaining passed filenames.

This works fine if target.yml exists - e.g. if you touch it first.

If target.yml does not exist, Drupal Console throws an exception:

PHP Warning:  file_put_contents(): Filename cannot be empty in phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Command/Yaml/MergeCommand.php on line 100
PHP Stack trace:
PHP   1. {main}() /usr/local/bin/drupal:0
PHP   2. require() /usr/local/bin/drupal:10
PHP   3. require() phar:///usr/local/bin/drupal/bin/drupal:3
PHP   4. Symfony\Component\Console\Application->run() phar:///usr/local/bin/drupal/bin/drupal.php:112
PHP   5. Drupal\Console\Launcher\Application->doRun() phar:///usr/local/bin/drupal/vendor/symfony/console/Application.php:122
PHP   6. Drupal\Console\Core\Application->doRun() phar:///usr/local/bin/drupal/src/Application.php:53
PHP   7. Symfony\Component\Console\Application->doRun() phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Application.php:115
PHP   8. Symfony\Component\Console\Application->doRunCommand() phar:///usr/local/bin/drupal/vendor/symfony/console/Application.php:191
PHP   9. Symfony\Component\Console\Command\Command->run() phar:///usr/local/bin/drupal/vendor/symfony/console/Application.php:868
PHP  10. Drupal\Console\Core\Command\Yaml\MergeCommand->execute() phar:///usr/local/bin/drupal/vendor/symfony/console/Command/Command.php:264
PHP  11. file_put_contents() phar:///usr/local/bin/drupal/vendor/drupal/console-core/src/Command/Yaml/MergeCommand.php:100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants