mirror of
https://github.com/mistydemeo/tigerbrew.git
synced 2026-11-27 03:19:46 -05:00
install: warn when passed no files
Rationale: we warn when inreplace makes no changes; this is a similar sort of warning. We expected some list (probably via Dir) to include some files, but none were found. Either the list was wrong, or the install can now be omitted.
This commit is contained in:
1 parent
fa08d70b6b
commit
423a8c34fe
1 file changed
+8
@@ -8,8 +8,16 @@ class Pathname
|
||||
sources.each do |src|
|
||||
case src
|
||||
when Array
|
||||
if src.empty?
|
||||
opoo "install was passed an empty array"
|
||||
return []
|
||||
end
|
||||
src.each {|s| results << install_p(s) }
|
||||
when Hash
|
||||
if src.empty?
|
||||
opoo "install was passed an empty hash"
|
||||
return []
|
||||
end
|
||||
src.each {|s, new_basename| results << install_p(s, new_basename) }
|
||||
else
|
||||
results << install_p(src)
|
||||
|
||||
Reference in new issue
Block a user