Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions scripts/uninstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ for (const dir of [path.join(getClaudeDir(), 'ponytail-modes'), path.join(os.hom
}
}
removeIfExists(path.join(process.env.CODEBUDDY_CONFIG_DIR || path.join(os.homedir(), '.codebuddy'), '.ponytail-active'), 'CodeBuddy mode flag');
removeIfExists(path.join(process.env.XDG_CONFIG_HOME || path.join(os.homedir(), '.config'), 'opencode', '.ponytail-active'), 'OpenCode mode flag');
removeIfExists(getConfigPath(), 'config file');
// Statusline script copies the activate hook keeps in the config dir (#1032).
for (const name of ['ponytail-statusline.sh', 'ponytail-statusline.ps1']) {
Expand Down
7 changes: 7 additions & 0 deletions tests/uninstall.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@ const qoderCustomFlagPath = path.join(qoderCustomDir, '.ponytail-active');
fs.mkdirSync(qoderCustomDir, { recursive: true });
fs.writeFileSync(qoderCustomFlagPath, 'lite');

// OpenCode keeps its flag beside its own config; a leftover "off" would start a
// reinstall switched off.
const opencodeFlagPath = path.join(temp, 'config-home', 'opencode', '.ponytail-active');
fs.mkdirSync(path.dirname(opencodeFlagPath), { recursive: true });
fs.writeFileSync(opencodeFlagPath, 'off');

const nudgeFlagPath = path.join(claudeDir, '.ponytail-statusline-nudged');
fs.writeFileSync(nudgeFlagPath, '');

Expand Down Expand Up @@ -84,6 +90,7 @@ let result = runUninstall(env);
assert.equal(result.status, 0, result.stderr);
assert.equal(fs.existsSync(flagPath), false, 'mode flag must be removed');
assert.equal(fs.existsSync(qoderFlagPath), false, 'Qoder mode flag must be removed');
assert.equal(fs.existsSync(opencodeFlagPath), false, 'OpenCode mode flag must be removed');
assert.equal(fs.existsSync(qoderCustomFlagPath), true, 'default Qoder uninstall must not touch a separate custom config');
assert.equal(fs.existsSync(nudgeFlagPath), false, 'statusline nudge flag must be removed');
assert.equal(fs.existsSync(configPath), false, 'config file must be removed');
Expand Down
Loading