Skip to content

Commit 0fb747e

Browse files
authored
Merge pull request #46 from Slamdunk/patch-1
DumpCommand: $_SERVER['SHELL'] can be not set
2 parents 509a415 + c2ee34a commit 0fb747e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DumpCommand.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ protected function configure()
2020
new InputOption('script-options', null, InputOption::VALUE_REQUIRED, "Options to be passed to the script."),
2121
new InputOption('aliases', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, "Extra aliases to be used."),
2222
new InputOption('disable-default-tools', null, InputOption::VALUE_NONE),
23-
new InputOption('shell', null, InputOption::VALUE_REQUIRED, 'Shell type ("bash", "fish" or "zsh")', basename($_SERVER['SHELL'])),
23+
new InputOption('shell', null, InputOption::VALUE_REQUIRED, 'Shell type ("bash", "fish" or "zsh")', isset($_SERVER['SHELL']) ? basename($_SERVER['SHELL']) : null),
2424
))
2525
->setDescription('Dumps shell autocompletion for any executable based on a Symfony Console Application.')
2626
;

0 commit comments

Comments
 (0)