Skip to content

Commit 8b522af

Browse files
committed
Correctly test for plugin if it is nil
1 parent aee55d4 commit 8b522af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/puppet/provider/mysql_user/mysql.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def create
5050

5151
# Use CREATE USER to be compatible with NO_AUTO_CREATE_USER sql_mode
5252
# This is also required if you want to specify a authentication plugin
53-
if defined? plugin
53+
if !plugin.nil?
5454
mysql([defaults_file, '-e', "CREATE USER '#{merged_name}' IDENTIFIED WITH '#{plugin}'"].compact)
5555
@property_hash[:ensure] = :present
5656
@property_hash[:plugin] = plugin

0 commit comments

Comments
 (0)