mirror of
https://github.com/denoland/deno.git
synced 2024-11-22 15:06:54 -05:00
fix: util.parseArgs() missing node:process import (#22405)
fix parseArgs() not working due to missing import of node:process this commit fixes issue #22363
This commit is contained in:
parent
c1fac11dfa
commit
3c7057d583
2 changed files with 9 additions and 0 deletions
|
@ -46,6 +46,8 @@ const {
|
||||||
ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL,
|
ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL,
|
||||||
} = codes;
|
} = codes;
|
||||||
|
|
||||||
|
import process from "node:process";
|
||||||
|
|
||||||
function getMainArgs() {
|
function getMainArgs() {
|
||||||
// Work out where to slice process.argv for user supplied arguments.
|
// Work out where to slice process.argv for user supplied arguments.
|
||||||
|
|
||||||
|
|
|
@ -315,3 +315,10 @@ Deno.test({
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Deno.test({
|
||||||
|
name: "[util] parseArgs() with no args works",
|
||||||
|
fn() {
|
||||||
|
util.parseArgs({});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
Loading…
Reference in a new issue