Skip to content

Commit 4c5cd75

Browse files
authored
Merge pull request #49 from pkgxdev/tweaks
Tweaks
2 parents fc35ac8 + c93d8fa commit 4c5cd75

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

pkgm.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const parsedArgs = parseArgs(Deno.args, {
5252
boolean: ["help", "version", "pin"],
5353
});
5454

55-
if (parsedArgs.help) {
55+
if (parsedArgs.help || parsedArgs._[0] == "help") {
5656
const { code } = await new Deno.Command("pkgx", {
5757
args: [
5858
"glow",
@@ -68,7 +68,10 @@ if (parsedArgs.help) {
6868
switch (parsedArgs._[0]) {
6969
case "install":
7070
case "i":
71-
await install(args, install_prefix().string);
71+
{
72+
const rv = await install(args, install_prefix().string);
73+
console.log(rv.join("\n"));
74+
}
7275
break;
7376
case "local-install":
7477
case "li":
@@ -159,6 +162,8 @@ async function install(args: string[], basePath: string) {
159162
await create_v_symlinks(join(dst, "pkgs", pkg_prefix));
160163
}
161164

165+
const rv = [];
166+
162167
for (const [project, env] of Object.entries(runtime_env)) {
163168
if (project == "pkgx.sh") continue;
164169

@@ -185,9 +190,13 @@ async function install(args: string[], basePath: string) {
185190
await Deno.remove(to_stub); //FIXME inefficient to symlink for no reason
186191
await Deno.writeTextFile(to_stub, sh);
187192
await Deno.chmod(to_stub, 0o755);
193+
194+
rv.push(to_stub);
188195
}
189196
}
190197
}
198+
199+
return rv;
191200
}
192201

193202
async function shim(args: string[], basePath: string) {

0 commit comments

Comments
 (0)