(#5495) Remove dead Windows-specific code from posix exec provider
Because this provider only applies when the posix feature is present (and thus
not the windows feature), it can never be used on Windows. Thus, the
Windows-specific command handling is unnecessary and unused.
Also added more specific error messages for the cases where a command doesn't
exist, isn't a file, and isn't executable. These only apply when the command
path is absolute (otherwise the message is simply command not found).
Reviewed-By: Matt Robinson <matt@puppetlabs.com>
(cherry picked from commit b28bcb031346cfd2026361ec5ffb420c1dcf60d7)
Conflicts:
spec/unit/provider/exec/posix_spec.rb