-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Deprecate backend.inc in favor of a new site-process library #3758
Conversation
…k. Set uri / root in a way that allows the caller to override them.
src/Commands/core/NotifyCommands.php
Outdated
} | ||
// Keep backward compat and prepare a string here. | ||
$cmd = sprintf($cmd, Escape::forSite(Drush::aliasManager()->getSelf(), $msg)); | ||
$process = Drush::process($cmd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not omit Escape::forSite and just:
$process = Drush::process($cmd, [$msg])
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the 2nd argument to process() is cwd, not a replacement array. And if there were two items in the $cmd array, it would quote the first long item which is invalid I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake. I meant:
$process = Drush::process([$cmd, $msg]);
That will escape the commands for you. Hm, that uses Symfony escaping instead of our improved escaping. Maybe we should have Drush::process use the Escape utilities to escape all of the parameters for the local machine. Escape::shellArg()
is the API to use to just escape for the local system.
648fa72
to
89a98c5
Compare
c7dd11c
to
ac61643
Compare
Reorganize test classes into subdirectories indicating their type.
Since drush-ops#3758 syncing a database between two remote Drush 9 servers using Drush 8 seems broken. Since drush-ops#3758 the object resulted by Drush for sql dump is an array containing the path, instead of a string of the path. Server specs: Local: Drush 8 Server @A: Drush 9.7.1 Server @b: Drush 9.7.1 Command executed at server Local: drush sql-sync @A @b Result before this PR: ``` The Drush sql-dump command did not report the path to the dump file produced. Try upgrading the version of Drush you are using on the source machine. ``` Result with this fix: ``` Starting to import dump file onto Destination database. [ok] ```
See site-process.
See questions in the diff. Can be tested with
composer -v sut @example.live ssh -- -v -s
Output shows new and then old (proc_open) shell command:
This is nowhere near ready - we'll be hacking more at Badcamp.