Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/dev-setup
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# bin/dev-teardown # clean up
set -e

REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
REPO_ROOT="$(cd "$(dirname "$0")/.." >/dev/null && pwd)"

# 1. Copy .env from main worktree (if we're a worktree and don't have one)
if [ ! -f "$REPO_ROOT/.env" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/dev-teardown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Remove local dev skill symlinks. Restores global gstack as the active install.
set -e

REPO_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
REPO_ROOT="$(cd "$(dirname "$0")/.." >/dev/null && pwd)"

removed=()

Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-community-dashboard
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# GSTACK_SUPABASE_ANON_KEY — override Supabase anon key
set -uo pipefail

GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." >/dev/null && pwd)}"

# Source Supabase config if not overridden by env
if [ -z "${GSTACK_SUPABASE_URL:-}" ] && [ -f "$GSTACK_DIR/supabase/config.sh" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-extension
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

set -e

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"

# Find the extension directory
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-learnings-log
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Append-only storage. Duplicates (same key+type) are resolved at read time
# by gstack-learnings-search ("latest winner" per key+type).
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
mkdir -p "$GSTACK_HOME/projects/$SLUG"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-learnings-search
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# resolves duplicates (latest winner per key+type), and outputs formatted text.
# Exit 0 silently if no learnings file exists.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"

Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-platform-detect
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail
# gstack-platform-detect: show which AI coding agents are installed and gstack status
# Config-driven: reads host definitions from hosts/*.ts via host-config-export.ts

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
GSTACK_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"

printf "%-16s %-10s %-40s %s\n" "Agent" "Version" "Skill Path" "gstack"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-relink
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# GSTACK_SKILLS_DIR — override target skills directory
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
GSTACK_CONFIG="${SCRIPT_DIR}/gstack-config"

# Detect install dir
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-repo-mode
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Cache: ~/.gstack/projects/$SLUG/repo-mode.json (7-day TTL)
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
# Compute SLUG directly (avoid eval of gstack-slug — branch names can contain shell metacharacters)
REMOTE_URL=$(git remote get-url origin 2>/dev/null || true)
if [ -z "$REMOTE_URL" ]; then
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-review-log
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# gstack-review-log — atomically log a review result
# Usage: gstack-review-log '{"skill":"...","timestamp":"...","status":"..."}'
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
mkdir -p "$GSTACK_HOME/projects/$SLUG"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-review-read
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# gstack-review-read — read review log and config for dashboard
# Usage: gstack-review-read
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
cat "$GSTACK_HOME/projects/$SLUG/$BRANCH-reviews.jsonl" 2>/dev/null || echo "NO_REVIEWS"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-specialist-stats
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# and outputs hit rates. Tags specialists as GATE_CANDIDATE (0 findings in 10+
# dispatches) or NEVER_GATE (security, data-migration — insurance policy).
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
PROJECT_DIR="$GSTACK_HOME/projects/$SLUG"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-telemetry-log
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# NOTE: Uses set -uo pipefail (no -e) — telemetry must never exit non-zero
set -uo pipefail

GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." >/dev/null && pwd)}"
STATE_DIR="${GSTACK_STATE_DIR:-$HOME/.gstack}"
ANALYTICS_DIR="$STATE_DIR/analytics"
JSONL_FILE="$ANALYTICS_DIR/skill-usage.jsonl"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-telemetry-sync
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# GSTACK_SUPABASE_URL — override Supabase project URL
set -uo pipefail

GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." >/dev/null && pwd)}"
STATE_DIR="${GSTACK_STATE_DIR:-$HOME/.gstack}"
ANALYTICS_DIR="$STATE_DIR/analytics"
JSONL_FILE="$ANALYTICS_DIR/skill-usage.jsonl"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-timeline-log
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Optional: branch, outcome, duration_s, session, ts.
# Validation failure → skip silently (non-blocking).
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"
mkdir -p "$GSTACK_HOME/projects/$SLUG"
Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-timeline-read
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Reads ~/.gstack/projects/$SLUG/timeline.jsonl, filters, formats.
# Exit 0 silently if no timeline file exists.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
SCRIPT_DIR="$(cd "$(dirname "$0")" >/dev/null && pwd)"
eval "$("$SCRIPT_DIR/gstack-slug" 2>/dev/null)"
GSTACK_HOME="${GSTACK_HOME:-$HOME/.gstack}"

Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-uninstall
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ if [ -z "${HOME:-}" ]; then
exit 1
fi

GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." >/dev/null && pwd)}"
STATE_DIR="${GSTACK_STATE_DIR:-$HOME/.gstack}"
_GIT_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || true)"

Expand Down
2 changes: 1 addition & 1 deletion bin/gstack-update-check
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# GSTACK_STATE_DIR — override ~/.gstack state directory
set -euo pipefail

GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." && pwd)}"
GSTACK_DIR="${GSTACK_DIR:-$(cd "$(dirname "$0")/.." >/dev/null && pwd)}"
STATE_DIR="${GSTACK_STATE_DIR:-$HOME/.gstack}"
CACHE_FILE="$STATE_DIR/last-update-check"
MARKER_FILE="$STATE_DIR/just-upgraded-from"
Expand Down