diff --git a/src/cli/actions/initAction.ts b/src/cli/actions/initAction.ts index 04a181f87..6f0555f51 100644 --- a/src/cli/actions/initAction.ts +++ b/src/cli/actions/initAction.ts @@ -39,11 +39,7 @@ export const runInitAction = async (rootDir: string, isGlobal: boolean): Promise }; export async function createConfigFile(rootDir: string, isGlobal: boolean): Promise { - const isCancelled = false; - - const configPath = isGlobal - ? path.resolve(getGlobalDirectory(), 'repomix.config.json') - : path.resolve(rootDir, 'repomix.config.json'); + const configPath = path.resolve(isGlobal ? getGlobalDirectory() : rootDir, 'repomix.config.json'); const isCreateConfig = await prompts.confirm({ message: `Do you want to create a ${isGlobal ? 'global ' : ''}${pc.green('repomix.config.json')} file?`, @@ -82,9 +78,6 @@ export async function createConfigFile(rootDir: string, isGlobal: boolean): Prom const options = await prompts.group( { outputStyle: () => { - if (isCancelled) { - return; - } return prompts.select({ message: 'Output style:', options: [ @@ -96,9 +89,6 @@ export async function createConfigFile(rootDir: string, isGlobal: boolean): Prom }); }, outputFilePath: ({ results }) => { - if (isCancelled) { - return; - } const defaultFilePath = defaultFilePathMap[results.outputStyle as RepomixOutputStyle]; return prompts.text({ message: 'Output file path:', diff --git a/src/cli/actions/remoteAction.ts b/src/cli/actions/remoteAction.ts index d285bd87f..2b0afb2ab 100644 --- a/src/cli/actions/remoteAction.ts +++ b/src/cli/actions/remoteAction.ts @@ -77,10 +77,7 @@ const cleanupTempDirectory = async (directory: string): Promise => { const checkGitInstallation = async (): Promise => { try { const result = await execAsync('git --version'); - if (result.stderr) { - return false; - } - return true; + return !result.stderr; } catch (error) { logger.debug('Git is not installed:', (error as Error).message); return false;