As of 2.9.2, if run outside of a repository, Git LFS will produce an
error if `git lfs install` is run outside of a repository. This occurs
because we look for a specific string in the error message to detect if
the directory is not a repository, but that message was no longer
included since the standard output of `git rev-parse` is not included.
Include the standard error output in the message so that we correctly
detect whether the directory is a repository or not and avoid printing
an error message in this case if it is not.
We build CentOS packages as root in the container, and root is not
constrained by a lack of write permission on a directory. Since one of
this test's assertions cannot work without us being able to test
permissions properly, disabled the test when run as root.
When git lfs install fails, exit unsuccessfully, so that the users
writing scripts can easily detect this error. Disable the test on
Windows, which does not have the proper chmod behavior to make the test
work.