Skip browser policy refresh when browser is not running (#5321)
chromium/brave --refresh-platform-policy blocks forever when the browser is not already running, hanging omarchy-update entirely. Guard both calls with pgrep so the policy file is still written (picked up on next launch) but the blocking refresh is skipped. Closes #4772
This commit is contained in:
1 parent
0a4490a1f1
commit
1ca9c7ea0d
1 file changed
+2
-2
@@ -14,11 +14,11 @@ if omarchy-cmd-present chromium || omarchy-cmd-present brave; then
|
||||
|
||||
if omarchy-cmd-present chromium; then
|
||||
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/chromium/policies/managed/color.json" >/dev/null
|
||||
chromium --refresh-platform-policy --no-startup-window &>/dev/null
|
||||
pgrep -x chromium >/dev/null && chromium --refresh-platform-policy --no-startup-window &>/dev/null
|
||||
fi
|
||||
|
||||
if omarchy-cmd-present brave; then
|
||||
echo "{\"BrowserThemeColor\": \"$THEME_HEX_COLOR\", \"BrowserColorScheme\": \"device\"}" | tee "/etc/brave/policies/managed/color.json" >/dev/null
|
||||
brave --refresh-platform-policy --no-startup-window &>/dev/null
|
||||
pgrep -x brave >/dev/null && brave --refresh-platform-policy --no-startup-window &>/dev/null
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user