herdr-remote 0.2.28 → 0.2.29
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.
|
@@ -21,9 +21,8 @@ async function closeOwnPane() {
|
|
|
21
21
|
// The shell's prompt comes back instead; the user can close the tab.
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
export async function runAdminShell(t) {
|
|
25
|
-
|
|
26
|
-
if (process.platform !== 'win32')
|
|
24
|
+
export async function runAdminShell(t, { stdin = process.stdin, stdout = process.stdout, platform = process.platform, } = {}) {
|
|
25
|
+
if (platform !== 'win32')
|
|
27
26
|
throw new Error(t('adminBroker.windowsOnly'));
|
|
28
27
|
if (!stdin.isTTY || !stdout.isTTY)
|
|
29
28
|
throw new Error(t('adminShell.needsTerminal'));
|
|
@@ -36,6 +35,9 @@ export async function runAdminShell(t) {
|
|
|
36
35
|
const relayResize = () => pty.resize(stdout.columns, stdout.rows);
|
|
37
36
|
stdin.setRawMode(true);
|
|
38
37
|
stdin.on('data', relayInput);
|
|
38
|
+
// The CLI's Windows color probe pauses stdin before any command runs, and a
|
|
39
|
+
// paused stream ignores a new 'data' listener: no key would reach PowerShell.
|
|
40
|
+
stdin.resume();
|
|
39
41
|
stdout.on('resize', relayResize);
|
|
40
42
|
try {
|
|
41
43
|
const exitCode = await new Promise((resolve, reject) => {
|
package/herdr-plugin.toml
CHANGED