Skip to content

Commit

Permalink
Merge pull request #5673 from nextcloud/enh/noid/improve-pullimage
Browse files Browse the repository at this point in the history
DockerActionManager: improve PullImage to always log something if it fails
  • Loading branch information
szaimen authored Dec 2, 2024
2 parents fd5b7de + 7f229b2 commit 531d239
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion php/src/Docker/DockerActionManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,11 @@ public function PullImage(Container $container) : void
try {
$this->guzzleClient->post($url);
} catch (RequestException $e) {
$message = "Could not pull image " . $imageName . ". Please run 'sudo docker exec -it nextcloud-aio-mastercontainer docker pull " . $imageName . "' in order to find out why it failed.";
if ($imageIsThere === false) {
throw new \Exception("Could not pull image " . $imageName . ". Please run 'sudo docker exec -it nextcloud-aio-mastercontainer docker pull " . $imageName . "' in order to find out why it failed.");
throw new \Exception($message);
} else {
error_log($message);
}
}
}
Expand Down

0 comments on commit 531d239

Please sign in to comment.