mirror of
https://ghproxy.net/https://github.com/jonbp/wp-cli-sync.git
synced 2025-10-04 04:26:17 +08:00
Variable typo fix
This commit is contained in:
parent
134a080b3e
commit
bc47696788
1 changed files with 16 additions and 3 deletions
|
@ -19,6 +19,11 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
|||
echo "\033[".$color."m".$title.": ".$message."\n\033[0m";
|
||||
}
|
||||
|
||||
// Line Break + Color Reset
|
||||
function lb_cr() {
|
||||
echo "\n\033[0m";
|
||||
}
|
||||
|
||||
// Fail Count Var
|
||||
$fail_count = 0;
|
||||
|
||||
|
@ -29,7 +34,15 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
|||
|
||||
// Exit if some vars missing
|
||||
if(empty($ssh_hostname) || empty($ssh_username) || empty($rem_proj_loc)) {
|
||||
exit('Error: some/all dev sync vars are not set in .env file');
|
||||
|
||||
// Exit Messages
|
||||
task_message('some/all dev sync vars are not set in .env file', 'Error', 31);
|
||||
task_message('I\'ve recently fixed a pretty obvious typo in this command and it\'s documentation (my bad)'."\n".'check the spelling of word \'LOCATION\' in the \'REMOTE_PROJECT_LOCATION\' variable'."\n".'in your \'.env\' file if this script worked fine before the update.', 'Notice', 33);
|
||||
|
||||
// Line Break + Color Reset + Exit
|
||||
lb_cr();
|
||||
exit();
|
||||
|
||||
}
|
||||
|
||||
// Plugin Vars
|
||||
|
@ -108,9 +121,9 @@ if ( defined( 'WP_CLI' ) && WP_CLI ) {
|
|||
}
|
||||
|
||||
// Final Line Break + Color Reset
|
||||
echo "\n\033[0m";
|
||||
lb_cr();
|
||||
|
||||
};
|
||||
|
||||
WP_CLI::add_command( 'sync', $sync);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue