Conversation
jbang.js
Outdated
|
|
||
|
|
||
| const path = | ||
| const path = shell.which('jbang') || |
There was a problem hiding this comment.
i believe we can't look for jbang first because then it will find that first. shouldn't that stay in place ?
There was a problem hiding this comment.
Not sure what that means... I can't be jbang.sh, because this is different... Do OSses find a directory here, which could cause issues?
There was a problem hiding this comment.
no, it looks up os and environment specific. like looking at PATHEXT on windows.
Meaning it is less deterministic on what binary it will pick; so shell.which('jbang') could give you 'jbang.exe', 'jbang.cmd', or 'jbang.someotherextinPATHEXT' ..and not necessarily in that orhder.
Hence why we in original code check for os first + specific and well known command (i.e. jbang.exe)
maxandersen
left a comment
There was a problem hiding this comment.
+1, I doing jbang --version is not
Fixes #20 in a very naive way.
A better solution would do
jbang.exefound -> store--versionoutputjbang.cmdfound -> store--versionoutput