Permalink
Browse files

Tweak ensure_ppa to not accept urls (even though the add-apt-reposito…

…ry command does)
  • Loading branch information...
1 parent 6973ee5 commit b5b0de3bea90ffefc4fe38b54660da0840d58b85 @cespare cespare committed Mar 27, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/terraform/terraform_dsl.rb
@@ -73,7 +73,7 @@ def ensure_package(package)
# Ensure an Ubuntu PPA is installed. The argument is the ppa location, in the form ppa:[USER]/[NAME]
def ensure_ppa(ppa)
ppa_part, location = ppa.split(":", 2)
- fail_and_exit("PPA location must be of the form ppa:[USER]/[NAME]") unless ppa_part && location
+ fail_and_exit("PPA location must be of the form ppa:[USER]/[NAME]") unless (ppa_part == "ppa") && location
ensure_package("python-software-properties")
dep "ppa: #{location}" do
met? { !`apt-cache policy 2> /dev/null | grep ppa.launchpad.net/#{location}/`.empty? }

0 comments on commit b5b0de3

Please sign in to comment.