fix: respect CLAUDE_CONFIG_DIR for plugin paths (#626)

Add MARKETPLACE_ROOT constant to paths.ts and update 5 source files to use
centralized path constants instead of hardcoded ~/.claude paths. Preserves
backwards compatibility when CLAUDE_CONFIG_DIR is not set.

Based on PR #634 by @Kuroakira, cherry-picked onto main due to build artifact
merge conflicts (source changes applied cleanly).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alex Newman
2026-02-06 03:00:08 -05:00
parent d935229711
commit 75a0f2e981
6 changed files with 18 additions and 16 deletions
+3 -2
View File
@@ -7,11 +7,12 @@
import { execSync, spawnSync } from 'child_process';
import { existsSync, unlinkSync } from 'fs';
import { homedir } from 'os';
import { join } from 'path';
import { logger } from '../../utils/logger.js';
import { MARKETPLACE_ROOT } from '../../shared/paths.js';
const INSTALLED_PLUGIN_PATH = join(homedir(), '.claude', 'plugins', 'marketplaces', 'thedotmack');
// Alias for code clarity - this is the installed plugin path
const INSTALLED_PLUGIN_PATH = MARKETPLACE_ROOT;
/**
* Validate branch name to prevent command injection