mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-02 21:41:19 +08:00
Fixes #14188: Add constants and function for sysexits(3) to ConsoleHelper
This commit is contained in:
committed by
Alexander Makarov
parent
0adae899ce
commit
2f9f15bf92
@ -10,6 +10,7 @@ namespace yii\console\controllers;
|
||||
use Yii;
|
||||
use yii\console\Controller;
|
||||
use yii\console\Exception;
|
||||
use yii\console\ExitCode;
|
||||
use yii\helpers\Console;
|
||||
use yii\helpers\FileHelper;
|
||||
use yii\helpers\VarDumper;
|
||||
@ -728,7 +729,7 @@ return [
|
||||
EOD;
|
||||
if (file_exists($configFile)) {
|
||||
if (!$this->confirm("File '{$configFile}' already exists. Do you wish to overwrite it?")) {
|
||||
return self::EXIT_CODE_NORMAL;
|
||||
return ExitCode::OK;
|
||||
}
|
||||
}
|
||||
if (!file_put_contents($configFile, $template)) {
|
||||
@ -736,7 +737,7 @@ EOD;
|
||||
}
|
||||
|
||||
$this->stdout("Configuration file template created at '{$configFile}'.\n\n", Console::FG_GREEN);
|
||||
return self::EXIT_CODE_NORMAL;
|
||||
return ExitCode::OK;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user