From b2c54d3eea6034532a1e48e55e313a07cd876206 Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Sun, 11 Jan 2026 03:35:33 -0600 Subject: [PATCH] fix symlink --- bin/agent-browser | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/bin/agent-browser b/bin/agent-browser index 9b14e8d..1dfe638 100755 --- a/bin/agent-browser +++ b/bin/agent-browser @@ -2,8 +2,19 @@ # Cross-platform launcher for agent-browser # Detects OS/arch and runs the appropriate native binary -# Get the directory where this script lives -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" +# Get the directory where this script lives (resolving symlinks) +SCRIPT="$0" +# Resolve symlinks +while [ -L "$SCRIPT" ]; do + SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)" + SCRIPT="$(readlink "$SCRIPT")" + # Handle relative symlinks + case "$SCRIPT" in + /*) ;; + *) SCRIPT="$SCRIPT_DIR/$SCRIPT" ;; + esac +done +SCRIPT_DIR="$(cd "$(dirname "$SCRIPT")" && pwd)" # Detect platform OS="$(uname -s)"