@jaguilar87/gaia-ops 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/gaia-update.js +5 -2
- package/package.json +1 -1
package/bin/gaia-update.js
CHANGED
|
@@ -82,18 +82,21 @@ async function updateSettingsJson() {
|
|
|
82
82
|
try {
|
|
83
83
|
const templatePath = join(__dirname, '../templates/settings.template.json');
|
|
84
84
|
const settingsPath = join(CWD, '.claude', 'settings.json');
|
|
85
|
+
const claudeDir = join(CWD, '.claude');
|
|
85
86
|
|
|
86
87
|
if (!existsSync(templatePath)) {
|
|
87
88
|
spinner.warn('Settings template not found, skipping');
|
|
88
89
|
return false;
|
|
89
90
|
}
|
|
90
91
|
|
|
91
|
-
if
|
|
92
|
+
// Only skip if .claude/ directory doesn't exist (true first-time install)
|
|
93
|
+
if (!existsSync(claudeDir)) {
|
|
92
94
|
spinner.info('First-time installation detected - skipping auto-update');
|
|
93
95
|
return false;
|
|
94
96
|
}
|
|
95
97
|
|
|
96
|
-
//
|
|
98
|
+
// If .claude/ exists, ALWAYS regenerate settings.json
|
|
99
|
+
// (even if settings.json was manually deleted)
|
|
97
100
|
const template = await fs.readFile(templatePath, 'utf-8');
|
|
98
101
|
await fs.writeFile(settingsPath, template, 'utf-8');
|
|
99
102
|
|