Skip to content

Commit

Permalink
DockerActionManager: improve PullImage to always log something if it …
Browse files Browse the repository at this point in the history
…fails

Signed-off-by: Simon L. <[email protected]>
  • Loading branch information
szaimen committed Nov 28, 2024
1 parent f723b7c commit 7f229b2
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 7f229b2

Please sign in to comment.