Skip to content

Commit

Permalink
Fixes #10
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 17, 2025
1 parent 8588514 commit ca393fc
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions pkgm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,7 @@ const parsedArgs = parse_args(Deno.args, {
});

if (parsedArgs.help) {
const status = await new Deno.Command("pkgx", {
args: ["gh", "repo", "view", "pkgxdev/pkgm"],
clearEnv: true,
env: {
"PATH": standardPath(),
"HOME": Deno.env.get("HOME")!,
},
}).spawn().status;
Deno.exit(status.code);
console.log("https://github.com/pkgxdev/pkgm");
} else if (parsedArgs.version) {
console.log("pkgm 0.0.0+dev");
} else {
Expand Down Expand Up @@ -66,7 +58,11 @@ if (parsedArgs.help) {
break;
}
default:
console.error("invalid usage");
if (Deno.args.length === 0) {
console.error("https://github.com/pkgxdev/pkgm");
} else {
console.error("invalid usage");
}
Deno.exit(2);
}
}
Expand Down

0 comments on commit ca393fc

Please sign in to comment.