mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 08:15:17 +00:00
fix(isolation): add getCcsDir/getCcsHome to more files
Fix test isolation in symlink managers and checkers to prevent tests from touching user's real ~/.ccs/ and ~/.claude/ directories. Files fixed: - src/api/services/profile-writer.ts - use getCcsDir() - src/management/checks/symlink-check.ts - use functions instead of module-level constants - src/utils/claude-dir-installer.ts - use getCcsDir() for CCS paths - src/utils/claude-symlink-manager.ts - use getCcsHome()/getCcsDir()
This commit is contained in:
1 parent
9b61f5318e
commit
6a2c82917d
4 files changed
+25
-12
No files matched your search
@@ -3,7 +3,6 @@
|
||||
* Supports both unified YAML config and legacy JSON config.
|
||||
*/
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
import { getCcsDir, getConfigPath, loadConfigSafe } from '../../utils/config-manager';
|
||||
import { expandPath } from '../../utils/helpers';
|
||||
@@ -83,7 +82,7 @@ function createApiProfileUnified(
|
||||
apiKey: string,
|
||||
models: ModelMapping
|
||||
): void {
|
||||
const ccsDir = path.join(os.homedir(), '.ccs');
|
||||
const ccsDir = getCcsDir();
|
||||
const settingsFile = `${name}.settings.json`;
|
||||
const settingsPath = path.join(ccsDir, settingsFile);
|
||||
|
||||
|
||||
Reference in new issue
Block a user