summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNamyoon Woo <namyoon@chromium.org>2019-06-21 08:41:48 -0700
committerCommit Bot <commit-bot@chromium.org>2019-06-22 03:37:42 +0000
commit260230523897331d9a36e48a6ff993a192f9af86 (patch)
tree6621325153481423e39645130ba66b0a9acc9524
parent3f80f258a4aad6a7ec048683586e0ecb6c122faf (diff)
downloadchrome-ec-260230523897331d9a36e48a6ff993a192f9af86.tar.gz
flash_ec: fix in returning the error code 1 for missing temp file
When flashing ec with servo_micro, though it was successful, flash returned 1 at the end. It was from an attemp to delete temp files, which do exist at all. This patch makes it tolerant. BUG=chromium:977240 BRANCH=None TEST=manually ran on Atlas Change-Id: I48f4d256cb7e98e9762d4821db48fbbbdfb94815 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1670844 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rwxr-xr-xutil/flash_ec4
1 files changed, 2 insertions, 2 deletions
diff --git a/util/flash_ec b/util/flash_ec
index 5199758e12..955a0d884b 100755
--- a/util/flash_ec
+++ b/util/flash_ec
@@ -889,8 +889,8 @@ function flash_flashrom() {
${FLASHROM_CMDLINE} -v "${T}"
fi
- [[ -f "${T}" ]] && rm "${T}"
- [[ -f "${L}" ]] && rm "${L}"
+ [[ -f "${T}" ]] && rm "${T}" || true
+ [[ -f "${L}" ]] && rm "${L}" || true
}
function flash_stm32() {