Skip to content

Commit 0bf9a2e

Browse files
authored
refactor(cli): remove useRawArgs from eval command (#35)
1 parent ce2a1c7 commit 0bf9a2e

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/cli/eval.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,9 @@ export function evalCommand() {
99
Or read from stdin:\n
1010
echo "console.log($.shell)" | dzx eval
1111
`)
12-
.arguments("<code:string>")
13-
.useRawArgs()
12+
.arguments("[code]")
1413
.action(
15-
async function (_: void, ...args: Array<string>) {
16-
if (["-h", "--help"].includes(args[0])) {
17-
this.showHelp();
18-
Deno.exit(0);
19-
}
20-
const code = args.shift();
21-
14+
async function (_: void, code?: string) {
2215
if (!code && Deno.isatty(Deno.stdin.rid)) {
2316
throw new ValidationError(`Missing argument(s): script`);
2417
}

0 commit comments

Comments
 (0)