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
[prog] is not searched in [PATH]. It is up to the caller to do the path resolution before calling this function.
However, it does not explain how the caller is expected to do that.
There are perhaps many ways to achieve in OCaml, nevertheless I propose that the documentation briefly mentions which method the library author(s) had in mind, and/or which method they are actually using when faced with that task.
Even better would be an actual helper function to resolve that, e.g.
spawn ... ~prog:(resolve_path prog_name) ...
The text was updated successfully, but these errors were encountered:
The idea is that spawn is a minimalist library that only exposes an efficient and complete primitive for starting processes. complete in the sense that it exposes all the options one might want, such as setting the cwd. In practice, this is very tedious to get right, especially since spawn uses vfork when possible.
Higher level functions are left to third-party libraries. For instance core or shexp have such functions.
That said, I personally wouldn't object to adding Spawn.resolve_program.
The documentation in
spawn.mli
says:However, it does not explain how the caller is expected to do that.
There are perhaps many ways to achieve in OCaml, nevertheless I propose that the documentation briefly mentions which method the library author(s) had in mind, and/or which method they are actually using when faced with that task.
Even better would be an actual helper function to resolve that, e.g.
spawn ... ~prog:(resolve_path prog_name) ...
The text was updated successfully, but these errors were encountered: