From 789d6e992f5b62362e0564981e2fbc08fa1c8b18 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Wed, 26 Mar 2025 12:00:31 -0400 Subject: [PATCH] Fix shims on macOS; Fixes #54 --- pkgm.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgm.ts b/pkgm.ts index b26e72b..fb5e7a9 100755 --- a/pkgm.ts +++ b/pkgm.ts @@ -223,9 +223,12 @@ async function shim(args: string[], basePath: string) { await Deno.remove(join(basePath, "bin", name)); } - await Deno.writeTextFile(join(basePath, "bin", name), shim, { + // without the newline zsh on macOS fails to invoke the interpreter with a bad interpreter error + await Deno.writeTextFile(join(basePath, "bin", name), shim + "\n", { mode: 0o755, }); + + console.error(join(basePath, "bin", name)); } } }