logger.error "Invalid ownership of credential file #{credential_path}, skip loading."
return
end
- unless (stat.mode & 0777).to_s(8) == "600"
+ if RUBY_PLATFORM !~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/ && (stat.mode & 0777).to_s(8) != "600"
logger.error "Invalid permission #{(stat.mode & 0777).to_s(8)} of credential file #{credential_path}, skip loading."
return
end