_drush_sql_get_spec_from_settings tries to require $file unnecessarily. The fact is that the function doesn't even use this parameter, so it should be eliminated, but in the meantime, I've just removed the one line that throws an error when trying to use sql_load
| Comment | File | Size | Author |
|---|---|---|---|
| nofile-sql.drush_.inc_.patch | 489 bytes | bdwelle |
Comments
Comment #1
moshe weitzman commentedInsufficient explanation of the change. A require can do many things and you need to explain why none of them are needed. It seems like you don't fully understand what this function is doing (understandable - minimal code comments)
Comment #2
bdwelle commentedMy point is that _drush_sql_get_spec_from_settings() includes the line
but the function is called without the $file parameter, and therefore the require throws an error.
Comment #3
jonhattanIf there's not some hidden magic around, it seems function `_drush_sql_get_spec_from_settings()` is not used anymore.
Comment #4
greg.1.anderson commentedYou are correct; removed, tested and committed.
Comment #5
scor commentedI just upgraded to the latest rc4 which broke a Drush command I wrote a week ago that uses _drush_sql_get_spec_from_settings(). ok, it's a helper function so I shouldn't have used it, but it's quite handy. Where do I go form here? Do I implement my own _drush_sql_get_spec_from_settings() fork, or would you welcome a public function doing the same thing? Or is there a better way of doing this with Drush's current API?
Comment #6
jonhattanI think you can use
_drush_sql_get_db_spec()from commands/sql/sql.drush.inc