fix crash due to permissions when clearing update staging dir (#21790)

This commit is contained in:
Adeeb Shihadeh
2021-07-29 19:50:34 -07:00
committed by GitHub
parent 028c81d39f
commit 3a7444250c
+2
View File
@@ -167,6 +167,8 @@ def init_overlay() -> None:
params.put_bool("UpdateAvailable", False)
set_consistent_flag(False)
dismount_overlay()
if TICI:
run(["sudo", "rm", "-rf", STAGING_ROOT])
if os.path.isdir(STAGING_ROOT):
shutil.rmtree(STAGING_ROOT)