MCPcopy Create free account
hub / github.com/anus-dev/ANUS / saveSettings

Function saveSettings

packages/cli/src/config/settings.ts:439–455  ·  view source on GitHub ↗
(settingsFile: SettingsFile)

Source from the content-addressed store, hash-verified

437}
438
439export function saveSettings(settingsFile: SettingsFile): void {
440 try {
441 // Ensure the directory exists
442 const dirPath = path.dirname(settingsFile.path);
443 if (!fs.existsSync(dirPath)) {
444 fs.mkdirSync(dirPath, { recursive: true });
445 }
446
447 fs.writeFileSync(
448 settingsFile.path,
449 JSON.stringify(settingsFile.settings, null, 2),
450 'utf-8',
451 );
452 } catch (error) {
453 console.error('Error saving user settings file:', error);
454 }
455}

Callers 1

setValueMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected