When running a command there are in general three possible sources of std::io::Error:
io error accessing the working dir
io error accessing the executable
io error while running the executable
The first two could happen at the same time, the third can only be encountered in the absence of the other two.
To improve the crate user's experience, whenever std::io::Error is returned by the underlying command call, it could possibly be investigated, if 1 or 2 (or both) are the case and return an error with as exact a message or two as possible. Since 1 and 2 may happen at the same time they can be captured by a single Error variant. 3 should probably be a separate variant since it will never happen simultaneously with 1-adn/or-2.
I was mistaken about the third case: io error inside the spawned command will not be returned as std::io::Error. This makes my proposal 1/3 less valuable. Sorry for the noise :)
When running a command there are in general three possible sources of std::io::Error:
The first two could happen at the same time, the third can only be encountered in the absence of the other two.
To improve the crate user's experience, whenever std::io::Error is returned by the underlying command call, it could possibly be investigated, if 1 or 2 (or both) are the case and return an error with as exact a message or two as possible. Since 1 and 2 may happen at the same time they can be captured by a single Error variant. 3 should probably be a separate variant since it will never happen simultaneously with 1-adn/or-2.
What do you think?