Skip to content

Commit

Permalink
Merge pull request #60 from Xeevis/master
Browse files Browse the repository at this point in the history
Expand args globs
  • Loading branch information
hayd authored Jan 25, 2022
2 parents d8402fb + 30ad8d2 commit 7c69f20
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export { parse as parseArgs } from "https://deno.land/std@0.122.0/flags/mod.ts";
export { expandGlob } from "https://deno.land/std@0.122.0/fs/mod.ts";
export * as colors from "https://deno.land/std@0.122.0/fmt/colors.ts";
9 changes: 7 additions & 2 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// deno -A main.ts deps.ts --test="deno test"

import { colors, parseArgs } from "./deps.ts";
import { colors, expandGlob, parseArgs } from "./deps.ts";
import { udd, UddOptions, UddResult } from "./mod.ts";
import { DenoLand } from "./registry.ts";

Expand Down Expand Up @@ -101,7 +101,12 @@ async function main(args: string[]) {
return version();
}

const depFiles: string[] = a._.map((x) => x.toString());
const depFiles: string[] = [];
for (const arg of a._.map((x) => x.toString())) {
for await (const file of expandGlob(arg)) {
depFiles.push(file.path);
}
}

if (depFiles.length === 0) {
help();
Expand Down

0 comments on commit 7c69f20

Please sign in to comment.