Descriptionos/exec: fix Command with relative paths
Command was (and is) documented like:
"If name contains no path separators, Command uses LookPath to
resolve the path to a complete name if possible. Otherwise it
uses name directly."
But that wasn't true. It always did LookPath, and then
set a sticky error that the user couldn't unset.
And then if cmd.Dir was changed, Start would still fail
due to the earlier sticky error being set.
This keeps LookPath in the same place as before (so no user
visible changes in cmd.Path after Command), but only does
it when the documentation says it will happen.
Also, clarify the docs about a relative Dir path.
No change in any existing behavior, except using Command
is now possible with relative paths. Previously it only
worked if you built the *Cmd by hand.
Fixes Issue 7228
Patch Set 1 #Patch Set 2 : diff -r ab7e873d13bd https://go.googlecode.com/hg/ #Patch Set 3 : diff -r ab7e873d13bd https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 033493cdf40e https://go.googlecode.com/hg/ #
Total comments: 1
MessagesTotal messages: 13
|