You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have no way to change the editor ... And also it not detects the default (vi, nano, vim, and neovim installed ... ). drush config:edit views.view.administerusersbyrole_people
or EDITOR=vim drush config:edit views.view.administerusersbyrole_people
TypeError: Drush\Commands\config\ConfigCommands::getEditor(): Argument #1 ($editor) must be of type ?string, bool given, called in /drupal-project/vendor/drush/drush/src/Commands/config/ConfigCommands.php on line 235 in /drupal-project/vendor/drush/drush/src/Exec/ExecTrait.php on line 99 #0 /drupal-project/vendor/drush/drush/src/Commands/config/ConfigCommands.php(235): Drush\Commands\config\ConfigCommands::getEditor()
#1 [internal function]: Drush\Commands\config\ConfigCommands->edit()
#2 /drupal-project/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#3 /drupal-project/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#4 /drupal-project/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#5 /drupal-project/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(387): Consolidation\AnnotatedCommand\CommandProcessor->process()
#6 /drupal-project/vendor/symfony/console/Command/Command.php(312): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#7 /drupal-project/vendor/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run()
#8 /drupal-project/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand()
#9 /drupal-project/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun()
#10 /drupal-project/vendor/drush/drush/src/Runtime/Runtime.php(110): Symfony\Component\Console\Application->run()
#11 /drupal-project/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#12 /drupal-project/vendor/drush/drush/drush.php(139): Drush\Runtime\Runtime->run()
#13 /drupal-project/vendor/drush/drush/drush(4): require('...')
#14 /drupal-project/vendor/bin/drush(120): include('...')
#15 {main}
TypeError: Drush\Commands\config\ConfigCommands::getEditor(): Argument #1 ($editor) must be of type ?string, bool given, called in /drupal-project/vendor/drush/drush/src/Commands/config/ConfigCommands.php on line 235 in Drush\Commands\config\ConfigCommands::getEditor() (line 99 of /drupal-project/vendor/drush/drush/src/Exec/ExecTrait.php).
[warning] Drush command terminated abnormally.
Adding drush.yml in webroot path with:
options:
editor: "vim"
Is not working.
And setting in various ways in execution time like is saying in --help :
drush config:edit views.view.administerusersbyrole_people --editor=vim
The "--editor" option does not accept a value.
drush config:edit views.view.administerusersbyrole_people --editor vim
Too many arguments to "config:edit" command, expected arguments "config_name"
drush config:edit --editor vim views.view.administerusersbyrole_people
Too many arguments to "config:edit" command, expected arguments "config_name"
Gives other errors too.
Workaround
Is there another way to do the desired action?
hardcoding $options['editor'] in vendor/drush/drush/src/Commands/config/ConfigCommands.php in fact I end up setting as this: 235: $exec = self::getEditor($options['editor']?:"");
System Configuration
Q
A
Drush version?
12.x
Drupal version?
10.x/
PHP version
8.1 and 8.2
OS?
Linux
The text was updated successfully, but these errors were encountered:
Fixed in #5683. You may now pass --editor=vim, for example.
If you want to set this via drush configuration, you must do so for each command you care about. --editor is not a global option. To set it for all commands, use EDITOR env variable. That is still working in my testing.
Describe the bug
I have no way to change the editor ... And also it not detects the default (vi, nano, vim, and neovim installed ... ).
drush config:edit views.view.administerusersbyrole_people
or
EDITOR=vim drush config:edit views.view.administerusersbyrole_people
Adding drush.yml in webroot path with:
Is not working.
And setting in various ways in execution time like is saying in --help :
Gives other errors too.
Workaround
Is there another way to do the desired action?
hardcoding $options['editor'] in vendor/drush/drush/src/Commands/config/ConfigCommands.php in fact I end up setting as this:
235: $exec = self::getEditor($options['editor']?:"");
System Configuration
The text was updated successfully, but these errors were encountered: