Check if man path is writable before writing

This commit is contained in:
Olle Jonsson 2016-02-25 19:22:34 +01:00
parent 772e403e40
commit 5bc90a32ae

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