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

pull/21792/head
Adeeb Shihadeh 2021-07-29 19:50:34 -07:00 committed by GitHub
parent 028c81d39f
commit 3a7444250c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

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)