Skip to content

Commit 0d71a3a

Browse files
ozgesolidkeyclaude
andcommitted
fix: Prevent SCRIPT_DIR override when sourcing local scripts
Changed LOCAL_SCRIPT_DIR in setup-pubsub-topics.sh to avoid overwriting the parent script's SCRIPT_DIR variable when sourced from manage.sh. This fixes path resolution issues like "local/local/check-status.sh". 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 5153ec4 commit 0d71a3a

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

local/setup-pubsub-topics.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
# This script creates the required Pub/Sub topics that the orchestrator service needs
55

66
# Source configuration
7-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
# Use LOCAL_SCRIPT_DIR to avoid overwriting parent's SCRIPT_DIR when sourced
8+
LOCAL_SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
89

910
# Try to source project-specific config first, fall back to generic config
10-
if [ -f "$SCRIPT_DIR/../project-config.sh" ]; then
11-
source "$SCRIPT_DIR/../project-config.sh"
11+
if [ -f "$LOCAL_SCRIPT_DIR/../project-config.sh" ]; then
12+
source "$LOCAL_SCRIPT_DIR/../project-config.sh"
1213
else
13-
source "$SCRIPT_DIR/../config.sh"
14+
source "$LOCAL_SCRIPT_DIR/../config.sh"
1415
fi
1516

1617
# Function to log messages

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@solidkeyab/firebase-devops-toolkit",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Enterprise-grade Firebase DevOps toolkit - 80+ production-ready scripts for local development, deployment, and team collaboration",
55
"main": "manage.sh",
66
"scripts": {

0 commit comments

Comments
 (0)