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

drush status fields have changed #3076

Closed
mf-lit opened this issue Oct 17, 2017 · 3 comments
Closed

drush status fields have changed #3076

mf-lit opened this issue Oct 17, 2017 · 3 comments

Comments

@mf-lit
Copy link

mf-lit commented Oct 17, 2017

Drush 9 has introduced a change to the output of status somewhere along the line:

Drush 8 and Drush 9-alpha1:

$ drush status | grep 'DB\|Database'
 Database driver        :  mysql                                                
 Database hostname      :  localhost                                            
 Database port          :                                                       
 Database username      :  xxxx                                            
 Database name          :  yyyy  

Drush9-beta7:

$ drush status | grep 'DB\|Database'
 DB driver        : mysql
 DB hostname      : localhost
 DB port          :    
 DB username      : xxxx
 DB name          : yyyy
 Database         : Connected  

This change from "Database" to "DB" has clobbered our build scripts as we're parsing information from this output. I'm curious if this change is necessary/intentional?

@greg-1-anderson
Copy link
Member

Major releases may introduce changes to clean things up or make things more clear. Scripts should not be parsing table output. Instead, use --format=yaml or --format=json. The keys in the machine-parsable formats should be unchanged.

That said, we could potentially convert from "DB" back to "Database". The shorter names are a little better for table output, though, as the right column can often contain long strings, so there is a benefit to shortening the left column, as that will tend to reduce wrapping in the long term.

@greg-1-anderson
Copy link
Member

Note also that Drush 9.0.0-beta5 abandons the old Drush command processor, and replaces it with the Symfony Console runtime. Drush 9.0.0-beta4 and earlier are strongly deprecated; there is no need to use those versions when comparing behavior change in Drush. Just compare 9.0.0-beta5 and later with versions of Drush 8.

@weitzman
Copy link
Member

Correct - please use yaml or json formats for scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants