From c20cc248c52e69372bbd92f1b5066558360fe211 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 21 Mar 2025 12:13:07 -0400 Subject: [PATCH 1/2] allow `pkgm help` --- pkgm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgm.ts b/pkgm.ts index ea464ce..2e1c56c 100755 --- a/pkgm.ts +++ b/pkgm.ts @@ -52,7 +52,7 @@ const parsedArgs = parseArgs(Deno.args, { boolean: ["help", "version", "pin"], }); -if (parsedArgs.help) { +if (parsedArgs.help || parsedArgs._[0] == "help") { const { code } = await new Deno.Command("pkgx", { args: [ "glow", From c93d8faf80f768f8365944b39a30c1a3b4eef823 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Fri, 21 Mar 2025 12:16:27 -0400 Subject: [PATCH 2/2] Show what is installed when running `pkgm install foo` --- pkgm.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/pkgm.ts b/pkgm.ts index 2e1c56c..35207e3 100755 --- a/pkgm.ts +++ b/pkgm.ts @@ -68,7 +68,10 @@ if (parsedArgs.help || parsedArgs._[0] == "help") { switch (parsedArgs._[0]) { case "install": case "i": - await install(args, install_prefix().string); + { + const rv = await install(args, install_prefix().string); + console.log(rv.join("\n")); + } break; case "local-install": case "li": @@ -159,6 +162,8 @@ async function install(args: string[], basePath: string) { await create_v_symlinks(join(dst, "pkgs", pkg_prefix)); } + const rv = []; + for (const [project, env] of Object.entries(runtime_env)) { if (project == "pkgx.sh") continue; @@ -185,9 +190,13 @@ async function install(args: string[], basePath: string) { await Deno.remove(to_stub); //FIXME inefficient to symlink for no reason await Deno.writeTextFile(to_stub, sh); await Deno.chmod(to_stub, 0o755); + + rv.push(to_stub); } } } + + return rv; } async function shim(args: string[], basePath: string) {