Open bhanu951 opened 1 year ago
You are using account-pass
in your workaround, but admin-password
in your drush.yml file. Does it work if you use account-pass
in the drush.yml file?
Hi @greg-1-anderson Thanks for response. It doesn't work for either.
Hi @greg-1-anderson just found out drush doesn't respect other commands overrides in yml file as well.
dev:
root: /var/www/html/web
uri: https://drupal-contrib.ddev.site
command:
site:
install:
options:
admin-password: 'admin'
sql:
dump:
options:
extra-dump: '--column-statistics=0 --no-tablespaces'
ddev drush sql:dump > ./databases/clean_db_03_08_2023.sql
mysqldump: Error: 'Access denied; you need (at least one of) the PROCESS privilege(s) for this operation' when trying to dump tablespaces
Due to Breaking Chnages in MYSQL 8+ we need to add -no-tablespaces
to drush sql:dump
command,
I added extra-dump: '--column-statistics=0 --no-tablespaces'
in yml file. But it is not respecting it.
The below command works
ddev drush sql:dump --extra-dump=--no-tablespaces > ./databases/clean_db_03_08_2023.sql
but
ddev drush sql:dump > ./databases/clean_db_03_08_2023.sql
after adding override in yml still produces error.
Drush configs : /var/www/html/vendor/drush/drush/drush.yml
. Suggests that your config file is not found. If it were you would see another entry here.
Hi @weitzman thanks for the response.
Can't we override command options in site alias yml file? Thats what I did. Same was suggested in example site alias yml file.
I am sure that my site alias file is loaded properly as I can run drush commands with including site alias.
Sorry I see mostly commands in your example without @dev
. Yes command options should work in site alias files as per https://www.drush.org/12.x/examples/example.site.yml/. Alias files are meant for remote sites but I think they still work for local sites (not recommended).
Thanks for looking into it. I tried both with and without site alias for testing , both produced same results. I will once again try with adding command overrides in drush.yml
file instead of site alias yml
file and update here.
Describe the bug
drush site-install fails to respect default password set in site alias yml file. We have option to set default password on site install in site alias file, but site-install command fails to respect it.
To Reproduce
Create a file named as
self.site.yml
indrush/sites/
directory similar to example.site.ymland run
drush @self.dev si
you will see below message.Expected behavior
It is expected that default password admin is set instead of generating random password every time we run the above command.
Actual behavior
It is generating random password every time we run the above command.
Workaround
drush @self.dev site:install standard --account-name=admin --account-pass=admin --site-name="Drupal 9" -y
System Configuration
This issue is reproduced on both Drush 11 and 12 with Drupal 9 and 10 and PHP 8 and 7 combinations.