History

Merge pull request #38 from aryasaatvik/fix/bin-symlink-resolution

Rhys Sullivan committed 7 months ago

Commit b3c9f412 parents ffcd7a3 3e798b81 file · +7 −1Browse files

Unified · Split

apps/executor/bin/executor+7−1
@@ -1,4 +1,10 @@
11 #!/usr/bin/env bash
22 set -euo pipefail
3−SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
3+SOURCE="$0"
4+while [ -L "$SOURCE" ]; do
5+ DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
6+ SOURCE="$(readlink "$SOURCE")"
7+ [[ "$SOURCE" != /* ]] && SOURCE="$DIR/$SOURCE"
8+done
9+SCRIPT_DIR="$(cd "$(dirname "$SOURCE")" && pwd)"
410 exec bun "$SCRIPT_DIR/../src/cli/main.ts" "$@"