From fdfeb66bac34d36a2ae57d9c437ad645f3d08d72 Mon Sep 17 00:00:00 2001 From: ronnorthrip Date: Fri, 1 Dec 2023 21:22:50 +0000 Subject: [PATCH] Fix styling --- src/Commands/DBPull.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Commands/DBPull.php b/src/Commands/DBPull.php index 1b2382f..123b7ea 100644 --- a/src/Commands/DBPull.php +++ b/src/Commands/DBPull.php @@ -179,8 +179,10 @@ public function handle() $this->info('Connect on remote server to database worked.'); } else { $this->error('Connect on remote server to database failed.'); + return self::FAILURE; } + return self::SUCCESS; } $full_dump = $this->option('full-dump'); @@ -363,18 +365,21 @@ public function ssh_get_tables() public function ssh_ping() { exec("ssh $this->remote_ssh 'whoami'", $result); + return implode("\n", $result) !== ''; } public function ssh_ping_mysql() { exec("ssh $this->remote_ssh '$this->remote_mysql_auth_echo | mysql --defaults-file=/dev/stdin -B -h $this->remote_mysql_host -P $this->remote_mysql_port $this->remote_mysql_database --disable-column-names -e \"SHOW TABLES\" '", $result); + return implode("\n", $result) !== ''; } public function ssh_count_migrations() { exec("ssh $this->remote_ssh 'ls -1 $this->remote_migrations_path | wc -l'", $result); + return 1 * implode('', $result); }