Skip to content

Commit 8e6bfba

Browse files
committed
Added better error message
1 parent ffd8ac6 commit 8e6bfba

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/CliTools/Console/Command/Docker/CliCommand.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,10 @@ public function execute(InputInterface $input, OutputInterface $output)
6262
# with Docker exec (faster, complex)
6363
###########################
6464
case 'docker-exec':
65+
$scriptEnvVar = $this->getApplication()->getConfigValue('docker', 'script_env_vars');
66+
6567
// Try to find defined script
66-
$scriptVarList = PhpUtility::trimExplode(',', $this->getApplication()->getConfigValue('docker', 'script_env_vars'));
68+
$scriptVarList = PhpUtility::trimExplode(',', $scriptEnvVar);
6769
$cliScript = $this->findAndGetDockerEnv($container, $scriptVarList);
6870

6971
// Try to find defined username
@@ -72,7 +74,7 @@ public function execute(InputInterface $input, OutputInterface $output)
7274

7375
if (empty($cliScript)) {
7476
$output->writeln(
75-
'<p-error>Docker container "' . $container . '" doesn\'t have environment variable "CLI_SCRIPT"</p-error>'
77+
'<p-error>Docker container "' . $container . '" doesn\'t have environment variables: ' . $scriptEnvVar . '</p-error>'
7678
);
7779

7880
return 1;

0 commit comments

Comments
 (0)