Skip to content

Commit 2762991

Browse files
committed
warn about $PATH correctly
1 parent 92306f6 commit 2762991

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

pkgm.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,16 @@ async function install(args: string[], basePath: string) {
189189
}
190190
}
191191

192-
if (!Deno.env.get("PATH")?.split(":")?.includes(basePath)) {
193-
console.error("%c! warning:", "color:yellow", `${basePath} not in $PATH`);
192+
if (
193+
!Deno.env.get("PATH")?.split(":")?.includes(
194+
new Path(basePath).join("bin").string,
195+
)
196+
) {
197+
console.error(
198+
"%c! warning:",
199+
"color:yellow",
200+
`${new Path(basePath).join("bin")} not in $PATH`,
201+
);
194202
}
195203

196204
return rv;

0 commit comments

Comments
 (0)