Permalink
Browse files

Check that the source file exists before checking its contents in 'ppa'.

  • Loading branch information...
1 parent 0995ab3 commit cc848b9b449805eb8d1ff1c74a4aefa7f59e2497 @benhoskings committed Oct 22, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 deps/apt.rb
View
1 deps/apt.rb
@@ -3,6 +3,7 @@
release.default!(Babushka.host.name)
def present_in_file? filename
+ filename.p.exists? &&
# e.g. deb http://au.archive.ubuntu.com/ubuntu/ natty main restricted
filename.p.read[/^deb\s+#{Regexp.escape(uri)}\s+#{release}\b.*\b#{repo}\b/]
end

0 comments on commit cc848b9

Please sign in to comment.