mirror of
https://github.com/yt-dlp/ejs.git
synced 2026-07-04 03:50:57 +00:00
Support non-global process
This commit is contained in:
6
run.ts
6
run.ts
@@ -1,14 +1,14 @@
|
|||||||
import { exit } from "node:process";
|
import { argv, exit } from "node:process";
|
||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
|
|
||||||
import { isOneOf } from "./src/utils.ts";
|
import { isOneOf } from "./src/utils.ts";
|
||||||
import main from "./src/main.ts";
|
import main from "./src/main.ts";
|
||||||
|
|
||||||
const args = process.argv.slice(2);
|
const args = argv.slice(2);
|
||||||
if (args.length < 2) {
|
if (args.length < 2) {
|
||||||
console.error(
|
console.error(
|
||||||
`ERROR: Missing argument\nusage: ${
|
`ERROR: Missing argument\nusage: ${
|
||||||
process.argv[1]
|
argv[1]
|
||||||
} <player> [<type>:<request> ...]`,
|
} <player> [<type>:<request> ...]`,
|
||||||
);
|
);
|
||||||
exit(1);
|
exit(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user