Skip to content

Commit f888971

Browse files
fix: default to cwd instead of interactive directory prompt (#18)
1 parent 36d728e commit f888971

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

src/index.ts

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,6 @@ function summarizeArgs(args: any): string {
178178
.join(", ");
179179
}
180180

181-
function askQuestion(question: string): Promise<string> {
182-
const rl = createInterface({ input: process.stdin, output: process.stdout });
183-
return new Promise((res) => {
184-
rl.question(question, (answer) => {
185-
rl.close();
186-
res(answer.trim());
187-
});
188-
});
189-
}
190-
191181
function isGitRepo(dir: string): boolean {
192182
try {
193183
execSync("git rev-parse --is-inside-work-tree", { cwd: dir, stdio: "pipe" });
@@ -345,12 +335,6 @@ async function main(): Promise<void> {
345335
});
346336
dir = localSession.dir;
347337
console.log(dim(`Local session: ${localSession.branch} (${localSession.dir})`));
348-
} else if (dir === process.cwd() && !prompt) {
349-
// No --repo: interactive prompt for dir
350-
const answer = await askQuestion(green("? ") + bold("Repository path") + dim(" (. for current dir)") + green(": "));
351-
if (answer) {
352-
dir = resolve(answer === "." ? process.cwd() : answer);
353-
}
354338
}
355339

356340
// Create sandbox context if --sandbox flag is set

0 commit comments

Comments
 (0)