Skip to content

Commit 7c69f20

Browse files
authored
Merge pull request #60 from Xeevis/master
Expand args globs
2 parents d8402fb + 30ad8d2 commit 7c69f20

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

deps.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export { parse as parseArgs } from "https://deno.land/std@0.122.0/flags/mod.ts";
2+
export { expandGlob } from "https://deno.land/std@0.122.0/fs/mod.ts";
23
export * as colors from "https://deno.land/std@0.122.0/fmt/colors.ts";

main.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// deno -A main.ts deps.ts --test="deno test"
22

3-
import { colors, parseArgs } from "./deps.ts";
3+
import { colors, expandGlob, parseArgs } from "./deps.ts";
44
import { udd, UddOptions, UddResult } from "./mod.ts";
55
import { DenoLand } from "./registry.ts";
66

@@ -101,7 +101,12 @@ async function main(args: string[]) {
101101
return version();
102102
}
103103

104-
const depFiles: string[] = a._.map((x) => x.toString());
104+
const depFiles: string[] = [];
105+
for (const arg of a._.map((x) => x.toString())) {
106+
for await (const file of expandGlob(arg)) {
107+
depFiles.push(file.path);
108+
}
109+
}
105110

106111
if (depFiles.length === 0) {
107112
help();

0 commit comments

Comments
 (0)