Skip to content

Commit 79767fb

Browse files
authored
Merge PR #461: scripts remove hardcoded paths
2 parents 9e5e829 + f1e49fd commit 79767fb

3 files changed

Lines changed: 13 additions & 8 deletions

File tree

GAP_ANALYSIS_2026-01-17.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ Week 10: Phase 4 + Final polish
292292
- [ ] `client/workspace-wizard.js` - Lines 25, 445
293293
- [ ] `client/greenfield-wizard.js` - Lines 18-19
294294
- [ ] `client/commander-panel.js` - Line 13
295+
- [x] `scripts/migrate-to-workspaces.js` - HyFire2 repo path now derives from `os.homedir()` / config (no hardcoded `/home/ab`)
296+
- [x] `scripts/orchestrator-startup.sh` - now uses script-relative repo path (no hardcoded `/home/ab`) and updates from `origin/main`
295297

296298
### New Test Files
297299
- [ ] `tests/unit/sessionManager.test.js`

scripts/migrate-to-workspaces.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,9 @@ async function ensureDirectories(basePath) {
124124
}
125125

126126
function createHyFire2Workspace(oldConfig) {
127+
const fallbackPath = path.join(os.homedir(), 'HyFire2');
128+
const candidatePath = oldConfig?.worktrees?.basePath || oldConfig?.worktrees?.masterPath || oldConfig?.worktrees?.path || null;
129+
const resolvedPath = candidatePath ? path.resolve(String(candidatePath)) : fallbackPath;
127130
return {
128131
id: 'hyfire2',
129132
name: 'HyFire 2',
@@ -133,7 +136,7 @@ function createHyFire2Workspace(oldConfig) {
133136
access: 'team',
134137

135138
repository: {
136-
path: '/home/ab/HyFire2',
139+
path: resolvedPath,
137140
masterBranch: 'master',
138141
remote: 'https://github.com/web3dev1337/hyfire2'
139142
},
@@ -412,4 +415,4 @@ async function createExampleWorkspaces(basePath) {
412415
}
413416

414417
// Run migration
415-
migrateToWorkspaces();
418+
migrateToWorkspaces();

scripts/orchestrator-startup.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ YELLOW='\033[1;33m'
99
RED='\033[0;31m'
1010
NC='\033[0m'
1111

12-
ORCHESTRATOR_DIR="/home/ab/GitHub/tools/automation/claude-orchestrator/claude-orchestrator-dev"
12+
ORCHESTRATOR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
1313
export ORCHESTRATOR_PORT="${ORCHESTRATOR_PORT:-4000}"
1414
CLIENT_PORT=2080
1515

@@ -41,14 +41,14 @@ cd "$ORCHESTRATOR_DIR" || {
4141
# Optional: Update to latest (can be disabled with --no-update flag)
4242
if [[ "$1" != "--no-update" ]]; then
4343
echo -e "${BLUE}📥 Checking for updates...${NC}"
44-
git fetch origin feature/multi-workspace-system >/dev/null 2>&1 || true
45-
44+
git fetch origin main >/dev/null 2>&1 || true
45+
4646
LOCAL=$(git rev-parse HEAD 2>/dev/null || echo "unknown")
47-
REMOTE=$(git rev-parse origin/feature/multi-workspace-system 2>/dev/null || echo "unknown")
48-
47+
REMOTE=$(git rev-parse origin/main 2>/dev/null || echo "unknown")
48+
4949
if [ "$LOCAL" != "$REMOTE" ] && [ "$REMOTE" != "unknown" ]; then
5050
echo -e "${BLUE}⬇️ Pulling updates...${NC}"
51-
git pull origin feature/multi-workspace-system 2>/dev/null || echo -e "${YELLOW}⚠ Could not pull (offline?)${NC}"
51+
git pull --ff-only origin main 2>/dev/null || echo -e "${YELLOW}⚠ Could not pull (offline?)${NC}"
5252

5353
# Update dependencies if package.json changed
5454
if git diff --name-only HEAD~1..HEAD 2>/dev/null | grep -q package.json; then

0 commit comments

Comments
 (0)