I am debugging a failure in code that is calling std::process::Command::output and returns an OS error 2 (file not found). Sadly, the error doesn't tell me which file is not found, and that may be the most important thing.
So, when can Command::output return "file not found"? Would it be something that'd be reasonable to document. The error condition is not self-evident to me, am I missing something?
Does it return an Err case of Result, or is the error in the Output object itself? In the former case, it's likely the program you're trying to launch which is not found. In the latter case, does the command work from the shell, in the same working directory with the same arguments?
Creating a pipe should always succeed under normal circumstances. Starting a process can fail if the executable isn't found or you don't have permission to execute it.