mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-07 16:41:06 +08:00
feat(install): 添加 Git Bash 多行提示修复功能并在卸载时询问移除
refactor(cli): 删除不再使用的 CLI 脚本和测试文件 fix(cli): 移除多行参数提示的输出
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { existsSync, unlinkSync, rmdirSync, readdirSync, statSync } from 'fs';
|
||||
import { join, dirname, basename } from 'path';
|
||||
import { homedir } from 'os';
|
||||
import { homedir, platform } from 'os';
|
||||
import inquirer from 'inquirer';
|
||||
import chalk from 'chalk';
|
||||
import { showBanner, createSpinner, success, info, warning, error, summaryBox, divider } from '../utils/ui.js';
|
||||
import { getAllManifests, deleteManifest } from '../core/manifest.js';
|
||||
import { removeGitBashFix } from './install.js';
|
||||
|
||||
// Global subdirectories that should be protected when Global installation exists
|
||||
const GLOBAL_SUBDIRS = ['workflows', 'scripts', 'templates'];
|
||||
@@ -256,6 +257,27 @@ export async function uninstallCommand(options: UninstallOptions): Promise<void>
|
||||
});
|
||||
}
|
||||
|
||||
// Ask to remove Git Bash fix on Windows if this is the last installation
|
||||
const remainingManifests = getAllManifests();
|
||||
if (platform() === 'win32' && remainingManifests.length === 0) {
|
||||
console.log('');
|
||||
const { removeFix } = await inquirer.prompt([{
|
||||
type: 'confirm',
|
||||
name: 'removeFix',
|
||||
message: 'Remove Git Bash multi-line prompt fix from shell config?',
|
||||
default: true
|
||||
}]);
|
||||
|
||||
if (removeFix) {
|
||||
const fixResult = removeGitBashFix();
|
||||
if (fixResult.removed) {
|
||||
info(`Git Bash fix: ${fixResult.message}`);
|
||||
} else {
|
||||
info(`Git Bash fix: ${fixResult.message}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
console.log('');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user