summaryrefslogtreecommitdiff
path: root/cli/js/os.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/os.ts')
-rw-r--r--cli/js/os.ts9
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/js/os.ts b/cli/js/os.ts
index d3c0d1b72..7953c2cef 100644
--- a/cli/js/os.ts
+++ b/cli/js/os.ts
@@ -29,6 +29,15 @@ export function hostname(): string {
return sendSync(dispatch.OP_HOSTNAME);
}
+/** Get OS release.
+ * Requires the `--allow-env` flag.
+ *
+ * console.log(Deno.osRelease());
+ */
+export function osRelease(): string {
+ return sendSync(dispatch.OP_OS_RELEASE);
+}
+
/** Exit the Deno process with optional exit code. */
export function exit(code = 0): never {
sendSync(dispatch.OP_EXIT, { code });