added error handling for client version print
This commit is contained in:
@@ -35,7 +35,11 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
|
||||
|
||||
// Get current image version
|
||||
let client_version = match get_current_image(&docker).await {
|
||||
Ok(version) => version.unwrap(),
|
||||
Ok(Some(version)) => version,
|
||||
Ok(None) => {
|
||||
eprintln!("Warning: No image version found");
|
||||
"unknown".to_string()
|
||||
}
|
||||
Err(e) => {
|
||||
eprintln!("Warning: Could not get current image version: {}", e);
|
||||
"unknown".to_string()
|
||||
|
Reference in New Issue
Block a user