mirror of https://github.com/coder/code-server.git
Fix --stdin-to-clipboard
With the switch to esm, this require is now failing. fs is already imported, so we can just use it anyway. Fixes #7056.
This commit is contained in:
parent
f2489265d2
commit
b8ef4e3edc
|
@ -110,7 +110,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
@@ -293,6 +294,23 @@ export async function main(desc: Product
|
@@ -293,6 +294,22 @@ export async function main(desc: Product
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -119,7 +119,6 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
|
||||||
+ console.error("stdin has a tty.");
|
+ console.error("stdin has a tty.");
|
||||||
+ return;
|
+ return;
|
||||||
+ }
|
+ }
|
||||||
+ const fs = require("fs");
|
|
||||||
+ const stdinBuffer = fs.readFileSync(0); // STDIN_FILENO = 0
|
+ const stdinBuffer = fs.readFileSync(0); // STDIN_FILENO = 0
|
||||||
+ const clipboardContent = stdinBuffer.toString();
|
+ const clipboardContent = stdinBuffer.toString();
|
||||||
+ sendToPipe({
|
+ sendToPipe({
|
||||||
|
|
Loading…
Reference in New Issue