Skip to content

Commit

Permalink
--editor must have a value (#5683)
Browse files Browse the repository at this point in the history
  • Loading branch information
weitzman committed Jul 2, 2023
1 parent 02d96d6 commit 3285e33
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Attributes/OptionsetGetEditor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@

use Attribute;
use Consolidation\AnnotatedCommand\Parser\CommandInfo;
use Drush\Commands\DrushCommands;

#[Attribute(Attribute::TARGET_METHOD)]
class OptionsetGetEditor
{
public static function handle(\ReflectionAttribute $attribute, CommandInfo $commandInfo)
{
$commandInfo->addOption('editor', 'A string of bash which launches user\'s preferred text editor. Defaults to <info>${VISUAL-${EDITOR-vi}}</info>.', [], '');
$commandInfo->addOption('editor', 'A string of bash which launches user\'s preferred text editor. Defaults to <info>${VISUAL-${EDITOR-vi}}</info>.', [], DrushCommands::REQ);
$commandInfo->addOption('bg', 'Launch editor in background process.', [], false);
}
}

0 comments on commit 3285e33

Please sign in to comment.