mirror of
https://github.com/lhns/steam-frame-nix.git
synced 2026-10-06 02:00:13 +02:00
Cleanup: the debugger restore reports a key changed to false as false, not absent
jq's // treats false like null. The runtime restore script changes with it, so the next SteamVR start rewrites it once (one daemon-reload).
This commit is contained in:
1 parent
1dd5df3d8b
commit
b48f644b1b
1 file changed
+1
-1
+1
-1
@@ -512,7 +512,7 @@ debugger_restore() { # vrsettings armed
|
|||||||
*) echo "steam-frame-nix: $armed holds '$prior', not a value it writes; left as is" >&2; return 1 ;;
|
*) echo "steam-frame-nix: $armed holds '$prior', not a value it writes; left as is" >&2; return 1 ;;
|
||||||
esac
|
esac
|
||||||
if [[ -f $f ]]; then
|
if [[ -f $f ]]; then
|
||||||
cur="$(jq -r '.VRWebHelper.DebuggerEnabled // "absent"' "$f")" || { echo "steam-frame-nix: can't read $f" >&2; return 1; }
|
cur="$(jq -r '.VRWebHelper.DebuggerEnabled | if . == null then "absent" else tostring end' "$f")" || { echo "steam-frame-nix: can't read $f" >&2; return 1; }
|
||||||
if [[ $cur == true ]]; then
|
if [[ $cur == true ]]; then
|
||||||
tmp="$(mktemp "$f.XXXXXX")" || return 1
|
tmp="$(mktemp "$f.XXXXXX")" || return 1
|
||||||
if ! jq --indent 3 "$filter" "$f" >"$tmp"; then rm -f "$tmp"; return 1; fi
|
if ! jq --indent 3 "$filter" "$f" >"$tmp"; then rm -f "$tmp"; return 1; fi
|
||||||
|
|||||||
Reference in new issue
Block a user