Permalink
Browse files

Return boolean from user_exists?

  • Loading branch information...
1 parent ea6485e commit df4f71f6b8d85d6c7fc3c2b32c7103d7f1e6905e @dmac dmac committed Oct 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/terraform/dsl.rb
View
@@ -142,7 +142,7 @@ def ensure_rbenv_ruby(ruby_version)
end
end
- def user_exists?(username) `id #{username} 2> /dev/null`.match(/^uid=\d+/) end
+ def user_exists?(username) !!`id #{username} 2> /dev/null`.match(/^uid=\d+/) end
def create_user(username) shell "useradd -m #{username}" end
def ensure_user(username)

0 comments on commit df4f71f

Please sign in to comment.