fix(desktop-update): discard failed profile allocation output

This commit is contained in:
Teknium
2026-09-07 02:45:25 -07:00
parent ca812ba3b5
commit a662f9d513
2 changed files with 2 additions and 1 deletions

View File

@@ -246,6 +246,7 @@ start_ui() {
{ [ -f "$html" ] && [ -n "$py" ] && [ -n "$browser" ]; } || { log "shim: no renderer; skipping UI"; return; }
UI_PROFILE_DIR="$(mktemp -d "${TMPDIR:-/tmp}/hermes-update-ui-XXXXXXXX")" || {
UI_PROFILE_DIR=""
log "shim: could not allocate a browser profile; skipping UI"
return
}

View File

@@ -22,7 +22,7 @@ def test_shim_removes_only_its_owned_profile(tmp_path, outcome):
browser.chmod(0o755)
if outcome == "allocation-failed":
allocator = bin_dir / "mktemp"
allocator.write_text("#!/bin/sh\nexit 1\n", encoding="utf-8")
allocator.write_text('#!/bin/sh\nprintf "%s\\n" "$HOME"\nexit 1\n', encoding="utf-8")
allocator.chmod(0o755)
config = tmp_path / ".config"
config.mkdir()