Skip to content

Commit 8d3ffa1

Browse files
Fix exec trap, unanchored sed, and replace vs removeprefix
- goose: drop exec so EXIT trap fires and cleans up wall + telepathy - gtwall: anchor sed in --list to strip only the wall- prefix - goosetown-ui: use removeprefix instead of replace for wall-id derivation
1 parent ff2b03f commit 8d3ffa1

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

goose

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ trap cleanup EXIT
4040
echo "🦆 Goosetown telepathy enabled: $TELEPATHY_FILE" >&2
4141
echo "🦆 Goosetown wall enabled: $WALL_FILE" >&2
4242

43-
exec "$GOOSE_BIN" "$@"
43+
"$GOOSE_BIN" "$@"

gtwall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ USAGE
358358
shopt -s nullglob
359359
for f in "${WALLS_DIR}"/wall-*.log; do
360360
if [[ -f "$f" ]]; then
361-
session=$(basename "$f" .log | sed 's/wall-//')
361+
session=$(basename "$f" .log | sed 's/^wall-//')
362362
lines=$(wc -l < "$f" | tr -d ' ')
363363
if [[ "$session" == "$SESSION_ID" ]]; then
364364
printf ' %s: %s messages (current)\n' "$session" "$lines"

scripts/goosetown-ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def main():
514514
wall_file = args.wall or find_wall_file()
515515
wall_id = ""
516516
if wall_file:
517-
wall_id = Path(wall_file).stem.replace("wall-", "")
517+
wall_id = Path(wall_file).stem.removeprefix("wall-")
518518
print(f"📜 Wall file: {wall_file}", file=sys.stderr)
519519
else:
520520
print("⚠️ No wall file found — will poll for it", file=sys.stderr)

0 commit comments

Comments
 (0)