Skip to content
Open
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 @@ -21,6 +21,7 @@ function removeIfExists(filePath, label) {
}

removeIfExists(path.join(getClaudeDir(), '.ponytail-active'), 'mode flag');
removeIfExists(path.join(getClaudeDir(), '.ponytail-statusline-nudged'), 'statusline nudge flag');
removeIfExists(getConfigPath(), 'config file');

const settingsPath = path.join(getClaudeDir(), 'settings.json');
Expand Down
4 changes: 4 additions & 0 deletions tests/uninstall.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ fs.mkdirSync(claudeDir, { recursive: true });
const flagPath = path.join(claudeDir, '.ponytail-active');
fs.writeFileSync(flagPath, 'full');

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

const configDir = path.join(temp, 'config-home', 'ponytail');
fs.mkdirSync(configDir, { recursive: true });
const configPath = path.join(configDir, 'config.json');
Expand All @@ -46,6 +49,7 @@ const env = {
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(nudgeFlagPath), false, 'statusline nudge flag must be removed');
assert.equal(fs.existsSync(configPath), false, 'config file must be removed');

const settingsAfter = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
Expand Down