Skip to content

Commit 9aede7e

Browse files
committed
fix enquirer bug
1 parent ee8045f commit 9aede7e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

bin/mongodb-rag.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ import { execSync } from 'child_process';
1414

1515
const isTestMode = process.env.NODE_ENV === 'test';
1616
const isNonInteractive = process.env.NONINTERACTIVE === 'true';
17+
const enquirer = new Enquirer();
1718

1819
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1920
const CONFIG_PATH = process.env.NODE_ENV === "test"
@@ -75,7 +76,6 @@ const getIndexParams = async (config) => {
7576
};
7677
}
7778

78-
const enquirer = new Enquirer();
7979
return enquirer.prompt([
8080
{
8181
type: 'input',
@@ -153,7 +153,6 @@ program
153153
.action(async () => {
154154
console.log(chalk.cyan.bold('🔧 Setting up MongoRAG configuration...\n'));
155155

156-
const enquirer = new Enquirer();
157156
const responses = await enquirer.prompt([
158157
{
159158
type: 'input',
@@ -404,7 +403,6 @@ program
404403
console.log(chalk.cyan.bold(`📂 Database: ${config.database}`));
405404
console.log(chalk.cyan.bold(`📑 Collection: ${config.collection}`));
406405

407-
const enquirer = new Enquirer();
408406
const { confirmDelete } = await enquirer.prompt([
409407
{
410408
type: 'confirm',

0 commit comments

Comments
 (0)