Check if man path is writable before writing

This commit is contained in:
Olle Jonsson 2016-02-25 19:22:34 +01:00 committed by Petr Korolev
parent 925f6fd3f0
commit 637de14699

View File

@ -15,7 +15,7 @@ task :create_man do |_t|
man_pages = "man/git-*.1"
Pathname.glob(man_pages) do |path|
if path.exist? && man_prefix.exist?
if path.exist? && man_prefix.exist? && man_prefix.writable?
FileUtils.cp(path, man_prefix + path.basename)
end
end