summaryrefslogtreecommitdiff
path: root/runtime/js/40_tty.js
diff options
context:
space:
mode:
authorMatt Mastracci <matthew@mastracci.com>2023-08-25 07:43:07 -0600
committerGitHub <noreply@github.com>2023-08-25 07:43:07 -0600
commitc272d26ae84ddf8ce1aa0456fbecedff102a64b0 (patch)
tree286eb981bd742ad0fd94b1aae08dfbc24b36b854 /runtime/js/40_tty.js
parent9e31f9452e0b91816b9114f17e7aaa5c226b9337 (diff)
chore(cli): remove atty crate (#20275)
Removes a crate with an outstanding vulnerability.
Diffstat (limited to 'runtime/js/40_tty.js')
-rw-r--r--runtime/js/40_tty.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/runtime/js/40_tty.js b/runtime/js/40_tty.js
index 859f49275..7476daad3 100644
--- a/runtime/js/40_tty.js
+++ b/runtime/js/40_tty.js
@@ -4,7 +4,6 @@ const ops = core.ops;
const primordials = globalThis.__bootstrap.primordials;
const {
Uint32Array,
- Uint8Array,
} = primordials;
const size = new Uint32Array(2);
@@ -14,10 +13,8 @@ function consoleSize() {
return { columns: size[0], rows: size[1] };
}
-const isattyBuffer = new Uint8Array(1);
function isatty(rid) {
- ops.op_isatty(rid, isattyBuffer);
- return !!isattyBuffer[0];
+ return ops.op_isatty(rid);
}
export { consoleSize, isatty };