From f425912bc82c7fc37551426f2758f3b4afd94f92 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 23 Jun 2026 21:58:48 +0000 Subject: [PATCH] fix(kyber-linux): handle shortcuts.vdf permission error gracefully If shortcuts.vdf exists but is not writable, attempt chmod 644 before writing. If that also fails, print a clear instruction and skip the shortcut step rather than crashing with a Python traceback. Co-Authored-By: Claude Sonnet 4.6 Claude-Session: https://claude.ai/code/session_01D8ckUJQtj1pH8jtAddBDZs --- scripts/setup-kyber-linux.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/setup-kyber-linux.sh b/scripts/setup-kyber-linux.sh index 68cac82..9a3684a 100755 --- a/scripts/setup-kyber-linux.sh +++ b/scripts/setup-kyber-linux.sh @@ -249,6 +249,15 @@ else SHORTCUTS_DIR="$STEAM_HOME/userdata/$STEAM_UID/config" SHORTCUTS_FILE="$SHORTCUTS_DIR/shortcuts.vdf" mkdir -p "$SHORTCUTS_DIR" + if [ -f "$SHORTCUTS_FILE" ] && [ ! -w "$SHORTCUTS_FILE" ]; then + echo " Fixing permissions on shortcuts.vdf..." + chmod 644 "$SHORTCUTS_FILE" || { + echo " WARNING: Cannot write $SHORTCUTS_FILE — run:" + echo " chmod 644 $SHORTCUTS_FILE" + echo " then re-run this script." + SKIP_STEAM_CFG=1 + } + fi [ -f "$SHORTCUTS_FILE" ] && cp "$SHORTCUTS_FILE" "$SHORTCUTS_FILE.bak" python3 - "$SHORTCUTS_FILE" "$KYBER_APPID" "$KYBER_EXE_WIN" "$KYBER_START_DIR" << 'PYEOF'