fix(desktop-update): discard failed profile allocation output
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user