You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to call the deno that's on the user's PATH (which is not the Deno.execPath())
I love the auto cross-platform commands.
99% of the time I do want $`deno` to be equivalent to $`${Deno.execPath()}` ).
I am super glad for them to be the default.
That said
Default means there's a way to use non-defaults. (hardcoded ≠ default)
It'd be nice to mention the shimmed deno behavior (took a bit to debug why the deno version was different from PATH)
Failed Workarounds
Absolute path: Usually, I'd get the absolute path to the PATH deno via which... but it appears dax also shims the output of which to return Deno.execPath() instead of the deno on PATH. I'm less thrilled about this behavior... but it is defend-able so I'm not going to ask for it to be changed. It does cause this workaround to fail though
sh -c fails as a workaround, both because the script needs to work cross platform, and because invoking a shell changes ENV vars (like SHLVL) which can affect commands I'm trying to run.
TLDR
Please consider an api like $.sys`deno --version` which bypasses the cross platform commands, and shimmed commands.
If that api is within scope, I'd be happy to give a shot at implementing it.
Extra / Maybe Bug
I don't know if this is intended behavior but $.raw will bypass the deno shim... but not the cross-platform commands. As a user I would expect either both were ignored, or neither.
The text was updated successfully, but these errors were encountered:
I need to call the deno that's on the user's PATH (which is not the
Deno.execPath()
)I love the auto cross-platform commands.
99% of the time I do want
$`deno`
to be equivalent to$`${Deno.execPath()}`
).I am super glad for them to be the default.
That said
deno
behavior (took a bit to debug why the deno version was different from PATH)Failed Workarounds
which
... but it appears dax also shims the output ofwhich
to return Deno.execPath() instead of the deno on PATH. I'm less thrilled about this behavior... but it is defend-able so I'm not going to ask for it to be changed. It does cause this workaround to fail thoughsh -c
fails as a workaround, both because the script needs to work cross platform, and because invoking a shell changes ENV vars (like SHLVL) which can affect commands I'm trying to run.TLDR
Please consider an api like
$.sys`deno --version`
which bypasses the cross platform commands, and shimmed commands.If that api is within scope, I'd be happy to give a shot at implementing it.
Extra / Maybe Bug
I don't know if this is intended behavior but
$.raw
will bypass the deno shim... but not the cross-platform commands. As a user I would expect either both were ignored, or neither.The text was updated successfully, but these errors were encountered: