arisa 2.3.44 → 2.3.45
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/daemon/setup.ts +9 -6
package/package.json
CHANGED
package/src/daemon/setup.ts
CHANGED
|
@@ -44,13 +44,16 @@ function saveEnv(vars: Record<string, string>) {
|
|
|
44
44
|
writeFileSync(ENV_PATH, content);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
//
|
|
47
|
+
// Robust readline that survives after child processes inherit stdin
|
|
48
48
|
async function readLine(question: string): Promise<string> {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
const rl = await import("node:readline");
|
|
50
|
+
const iface = rl.createInterface({ input: process.stdin, output: process.stdout });
|
|
51
|
+
return new Promise<string>((resolve) => {
|
|
52
|
+
iface.question(question, (answer) => {
|
|
53
|
+
iface.close();
|
|
54
|
+
resolve(answer.trim());
|
|
55
|
+
});
|
|
56
|
+
});
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
export async function runSetup(): Promise<boolean> {
|