Skip to content

Commit b8ef4e3

Browse files
committed
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.
1 parent f248926 commit b8ef4e3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

patches/clipboard.diff

+1-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
110110
return true;
111111
default:
112112
return false;
113-
@@ -293,6 +294,23 @@ export async function main(desc: Product
113+
@@ -293,6 +294,22 @@ export async function main(desc: Product
114114
}
115115
}
116116
} else {
@@ -119,7 +119,6 @@ Index: code-server/lib/vscode/src/vs/server/node/server.cli.ts
119119
+ console.error("stdin has a tty.");
120120
+ return;
121121
+ }
122-
+ const fs = require("fs");
123122
+ const stdinBuffer = fs.readFileSync(0); // STDIN_FILENO = 0
124123
+ const clipboardContent = stdinBuffer.toString();
125124
+ sendToPipe({

0 commit comments

Comments
 (0)