Skip to content

Commit

Permalink
Merge pull request #16 from tizzo/feature/exit-cleanly
Browse files Browse the repository at this point in the history
Feature/exit cleanly
  • Loading branch information
tizzo committed Dec 5, 2016
2 parents 97f3d12 + 0982c6a commit 2e8aa97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion fetcher.drush.inc
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ function fetcher_get_site($name = FALSE, $conf = array()) {
// to the infoFetcher if no site_info.yaml was already found.
// This only make sense if we have a name to call with.
if ($name) {
$site->fetchInfo();
if ($site->fetchInfo() == FALSE) {
drush_set_error('Site does not exist');
exit(1);
}
}

// Now we re-apply configuration keys form the context because anything
Expand Down
5 changes: 4 additions & 1 deletion lib/Fetcher/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,10 @@ public function fetchInfo($force_remote = FALSE) {
$return = $this->configureWithSiteInfoFile();
}
else {
if ($conf = $this['info_fetcher']->getInfo($this['name.global'])) {
if (!$conf = $this['info_fetcher']->getInfo($this['name.global'])) {
return FALSE;
}
else {
$this->configure($conf);
$return = TRUE;
}
Expand Down

0 comments on commit 2e8aa97

Please sign in to comment.