Merge pull request #1232 from ggtakec/test_err_avoid

Not trap chown command errors directly
This commit is contained in:
Takeshi Nakatani 2020-01-28 20:47:54 +09:00 committed by GitHub
commit 9771be29b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -233,7 +233,14 @@ function test_chown {
ORIGINAL_PERMISSIONS=$(stat --format=%u:%g $TEST_TEXT_FILE)
fi
chown 1000:1000 $TEST_TEXT_FILE;
# [NOTE]
# Prevents test interruptions due to permission errors, etc.
# If the chown command fails, an error will occur with the
# following judgment statement. So skip the chown command error.
# '|| true' was added due to a problem with Travis CI and MacOS
# and ensure_diskfree option.
#
chown 1000:1000 $TEST_TEXT_FILE || true
# if they're the same, we have a problem.
if [ `uname` = "Darwin" ]; then