Skip to content

Commit

Permalink
Fixed regression where testRepository would erroneously pass with i…
Browse files Browse the repository at this point in the history
…nvalid credentials. Fixed Exception thrown with `bin/plugin git-sync status` command, preventing `sync` (#199, fixes #200)
  • Loading branch information
w00fz committed Apr 30, 2021
1 parent c9a3d33 commit 7f7b127
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v2.3.1
## 04/30/2021

1. [](#bugfix)
* Fixed regression where `testRepository` would erroneously pass with invalid credentials [#200](https://github.com/trilbymedia/grav-plugin-git-sync/issues/200)
* Fixed Exception thrown with `bin/plugin git-sync status` command, preventing `sync` [#200](https://github.com/trilbymedia/grav-plugin-git-sync/issues/200)

# v2.3.0
## 04/27/2021

Expand Down
2 changes: 1 addition & 1 deletion classes/GitSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public function execute($command, $quiet = false)
exec($command, $output, $returnValue);
}

if ($returnValue !== 0 && (!empty($output) && $returnValue === 5) && !$quiet) {
if ($returnValue !== 0 && $returnValue !== 5 && !$quiet) {
throw new \RuntimeException(implode("\r\n", $output));
}

Expand Down
3 changes: 2 additions & 1 deletion cli/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ protected function serve()
Helper::prepareRepository(
$plugin->getUser() ?? '',
$password,
$repository)
$repository),
$plugin->getRemote('branch', null),
);
$this->console_log($testRepository, $password);

Expand Down

0 comments on commit 7f7b127

Please sign in to comment.