Fix TypeError in ConfigCommand (#10753)

* Fix TypeError in ConfigCommand

* Update ConfigCommand.php
main
Markus Staab 2 years ago committed by GitHub
parent f728b0b007
commit c36a9350bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -214,7 +214,7 @@ EOT
{ {
// Open file in editor // Open file in editor
if (true === $input->getOption('editor')) { if (true === $input->getOption('editor')) {
$editor = escapeshellcmd(Platform::getEnv('EDITOR')); $editor = Platform::getEnv('EDITOR');
if (!$editor) { if (!$editor) {
if (Platform::isWindows()) { if (Platform::isWindows()) {
$editor = 'notepad'; $editor = 'notepad';
@ -226,6 +226,8 @@ EOT
} }
} }
} }
} else {
$editor = escapeshellcmd($editor);
} }
$file = $input->getOption('auth') ? $this->authConfigFile->getPath() : $this->configFile->getPath(); $file = $input->getOption('auth') ? $this->authConfigFile->getPath() : $this->configFile->getPath();

Loading…
Cancel
Save