Fix wolf.sh manage.sh apps: detect installed apps regardless of indentation
INSTALLED=$(sudo grep "^ name = 'Wolf" ...) required exactly 4 leading
spaces before name = 'Wolf...' in Wolf's own generated config.toml.
Confirmed live: Wolf's TOML writer doesn't reliably indent that way, so
this came back empty even with apps clearly installed and running,
printing "No Wolf apps installed yet". That's silently wrong in two
ways: the "Already installed: ..." message under-reports, and pressing
Enter at the apps prompt ("update mounts only") falls through to the
hardcoded `steam esde` default instead of actually refreshing whatever
was already there — so a mount fix for an already-installed app (e.g.
RetroArch) never gets applied by the Enter/no-picks path at all.
Relaxed the anchor to tolerate any amount of leading whitespace,
matching the Python injector's own already-installed check a few lines
later, which never anchored on indentation to begin with.
This commit is contained in:
+7
-1
@@ -1226,7 +1226,13 @@ case "$1" in
|
||||
# Show which apps are already installed and what's available
|
||||
echo ""
|
||||
echo " Checking current Wolf config..."
|
||||
INSTALLED=$(sudo grep "^ name = 'Wolf" "$WOLF_CFG" 2>/dev/null | sed "s/.*name = '//;s/'//" | tr '\n' ' ')
|
||||
# Any amount of leading whitespace (or none) — Wolf's own TOML writer
|
||||
# doesn't reliably indent with exactly 4 spaces, and a stricter
|
||||
# anchor here silently reports "No Wolf apps installed yet" even
|
||||
# when apps clearly are (confirmed live), which then makes the
|
||||
# Enter/"update mounts only" path fall back to the hardcoded
|
||||
# steam+esde default instead of actually refreshing what's there.
|
||||
INSTALLED=$(sudo grep -E "^[[:space:]]*name = 'Wolf" "$WOLF_CFG" 2>/dev/null | sed "s/.*name = '//;s/'//" | tr '\n' ' ')
|
||||
[ -n "$INSTALLED" ] && echo " Already installed: $INSTALLED" || echo " No Wolf apps installed yet."
|
||||
echo ""
|
||||
echo " Available apps:"
|
||||
|
||||
Reference in New Issue
Block a user