Skip to content

Commit d136067

Browse files
author
Cully Larson
committed
Wasn't properly hadnling the exit code of rsync.
1 parent ee52cd3 commit d136067

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Wordpress/Deploy/FolderSync.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,8 @@ public function sync($statusCallback=null) {
6767

6868
exec($command, $output, $ret);
6969

70+
$success = !boolval($ret);
71+
7072
/*
7173
* Get output
7274
*/
@@ -79,13 +81,13 @@ public function sync($statusCallback=null) {
7981
* Process errors
8082
*/
8183

82-
if(!$ret) {
84+
if(!$success) {
8385
$this->doStatusCallback(
8486
new Status("Something went wrong. Sync did not complete successfully.", Status::MT_ERROR),
8587
$statusCallback);
8688
}
8789

88-
return boolval($ret);
90+
return $success;
8991
}
9092

9193
/**

0 commit comments

Comments
 (0)