Check if man path is writable before writing
This commit is contained in:
parent
772e403e40
commit
5bc90a32ae
2
Rakefile
2
Rakefile
|
@ -15,7 +15,7 @@ task :create_man do |_t|
|
||||||
man_pages = "man/git-*.1"
|
man_pages = "man/git-*.1"
|
||||||
|
|
||||||
Pathname.glob(man_pages) do |path|
|
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)
|
FileUtils.cp(path, man_prefix + path.basename)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user