KubeOS/0001-fix-kbimg-add-return-statement-for-non-existent-disk.patch

27 lines
872 B
Diff
Raw Permalink Normal View History

From dce6ad3578e0fef7d60e52d926db6835f6c437c0 Mon Sep 17 00:00:00 2001
From: Yuhang Wei <weiyuhang3@huawei.com>
Date: Wed, 11 Dec 2024 10:57:09 +0800
Subject: [PATCH 1/3] fix(kbimg): add return statement for non-existent disk
handling
Signed-off-by: Yuhang Wei <weiyuhang3@huawei.com>
---
KubeOS-Rust/kbimg/src/values.rs | 1 +
1 file changed, 1 insertion(+)
diff --git a/KubeOS-Rust/kbimg/src/values.rs b/KubeOS-Rust/kbimg/src/values.rs
index 3986c13f..c36cacb9 100644
--- a/KubeOS-Rust/kbimg/src/values.rs
+++ b/KubeOS-Rust/kbimg/src/values.rs
@@ -508,6 +508,7 @@ function GetDisk() {
echo "${disk} exists, start partition" | tee -a ${log}
else
echo "disk not exist, please choose correct disk" | tee -a ${log}
+ return 1
fi
else
echo "no disk found" | tee -a ${log}
--
2.39.5 (Apple Git-154)