Skip to main content

Crate bun_which

Crate bun_which 

Source

Functions§

batch_arg_has_cmd_metachars
Returns true when arg contains a byte cmd.exe would reinterpret while re-tokenizing the command line of a .bat/.cmd invocation: " breaks out of libuv’s MSVCRT-style quoting, % expands environment variables even inside quotes, and the rest are command separators / redirection / escape characters in unquoted positions. None of these can be escaped for cmd.exe, so callers must reject the spawn instead.
ends_with_extension
is_batch_file
Returns true when path names a Windows batch script (.cmd / .bat).
which
which_win
This is the windows version of which. It operates on wide strings. It is similar to Get-Command in powershell.