rechrome 1.11.1 → 1.11.2
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/rech.js +8 -2
- package/rech.ts +8 -2
package/package.json
CHANGED
package/rech.js
CHANGED
|
@@ -678,11 +678,17 @@ async function setup(opts: { profile?: string } = {}): Promise<void> {
|
|
|
678
678
|
while (true) {
|
|
679
679
|
const found = await findInstalledExtension(profileDir);
|
|
680
680
|
if (found) { extId = found.id; break; }
|
|
681
|
+
console.log(`\n Extension not found in profile: ${profileDisplay}`);
|
|
682
|
+
console.log(` Extension dist: ${EXTENSION_DIST_DIR}`);
|
|
683
|
+
// Non-TTY (agent/pipe) can't install an extension interactively, and `ask` doesn't block on an exhausted stdin queue —
|
|
684
|
+
// looping here would spawn `open` per iteration until the OS runs out of resources. Fail fast instead.
|
|
685
|
+
if (!isTTY) {
|
|
686
|
+
console.error(` Non-TTY: cannot install extension interactively — aborting`);
|
|
687
|
+
return null;
|
|
688
|
+
}
|
|
681
689
|
const setupHtmlPath = join(RECH_HOME_DIR, "setup.html");
|
|
682
690
|
mkdirSync(RECH_HOME_DIR, { recursive: true });
|
|
683
691
|
await Bun.write(setupHtmlPath, buildSetupHtml(EXTENSION_DIST_DIR, profileDisplay));
|
|
684
|
-
console.log(`\n Extension not found in profile: ${profileDisplay}`);
|
|
685
|
-
console.log(` Extension dist: ${EXTENSION_DIST_DIR}`);
|
|
686
692
|
console.log(`\n Opening install guide in your browser...`);
|
|
687
693
|
Bun.spawn(["open", setupHtmlPath], { stdout: "ignore", stderr: "ignore" });
|
|
688
694
|
await ask("\n Press Enter after loading the extension to retry...");
|
package/rech.ts
CHANGED
|
@@ -678,11 +678,17 @@ async function setup(opts: { profile?: string } = {}): Promise<void> {
|
|
|
678
678
|
while (true) {
|
|
679
679
|
const found = await findInstalledExtension(profileDir);
|
|
680
680
|
if (found) { extId = found.id; break; }
|
|
681
|
+
console.log(`\n Extension not found in profile: ${profileDisplay}`);
|
|
682
|
+
console.log(` Extension dist: ${EXTENSION_DIST_DIR}`);
|
|
683
|
+
// Non-TTY (agent/pipe) can't install an extension interactively, and `ask` doesn't block on an exhausted stdin queue —
|
|
684
|
+
// looping here would spawn `open` per iteration until the OS runs out of resources. Fail fast instead.
|
|
685
|
+
if (!isTTY) {
|
|
686
|
+
console.error(` Non-TTY: cannot install extension interactively — aborting`);
|
|
687
|
+
return null;
|
|
688
|
+
}
|
|
681
689
|
const setupHtmlPath = join(RECH_HOME_DIR, "setup.html");
|
|
682
690
|
mkdirSync(RECH_HOME_DIR, { recursive: true });
|
|
683
691
|
await Bun.write(setupHtmlPath, buildSetupHtml(EXTENSION_DIST_DIR, profileDisplay));
|
|
684
|
-
console.log(`\n Extension not found in profile: ${profileDisplay}`);
|
|
685
|
-
console.log(` Extension dist: ${EXTENSION_DIST_DIR}`);
|
|
686
692
|
console.log(`\n Opening install guide in your browser...`);
|
|
687
693
|
Bun.spawn(["open", setupHtmlPath], { stdout: "ignore", stderr: "ignore" });
|
|
688
694
|
await ask("\n Press Enter after loading the extension to retry...");
|