Skip to content

Commit

Permalink
Fix matter failures on grub-mkconfig halting upgrades #67
Browse files Browse the repository at this point in the history
  • Loading branch information
mateosss committed Jun 6, 2021
1 parent 5bdb8bb commit 3619959
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion matter.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,8 +641,16 @@ def do_set_icons(patch_grubcfg):
# seticons_call = f"{INSTALLER_DIR}/{INSTALLER_NAME} -so -i {cmd_icons} >&2"
seticons_call = f"{INSTALLER_DIR}/{INSTALLER_NAME} --configicons >&2"
new_grub_mkconfig = read_cleaned_grub_mkconfig()

# grub-mkconfig is called on upgrade, and on failure it halts.
# A failure on our part should not halt an upgrade, let's temporarily
# disable the stop-on-error functionality with set +e. See #67
new_grub_mkconfig += (
f"\n\n{BEGIN_THEME_OVERRIDES}\n{seticons_call}\n{END_THEME_OVERRIDES}\n\n"
f"\n\n{BEGIN_THEME_OVERRIDES}\n"
f"set +e\n"
f"{seticons_call}\n"
f"set -e\n"
f"{END_THEME_OVERRIDES}\n\n"
)

check_root_or_prompt()
Expand Down

0 comments on commit 3619959

Please sign in to comment.