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
12 changes: 1 addition & 11 deletions src/cli/actions/initAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ export const runInitAction = async (rootDir: string, isGlobal: boolean): Promise
};

export async function createConfigFile(rootDir: string, isGlobal: boolean): Promise<boolean> {
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?`,
Expand Down Expand Up @@ -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: [
Expand All @@ -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:',
Expand Down
5 changes: 1 addition & 4 deletions src/cli/actions/remoteAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,7 @@ const cleanupTempDirectory = async (directory: string): Promise<void> => {
const checkGitInstallation = async (): Promise<boolean> => {
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;
Expand Down