Skip to content

Commit 411d085

Browse files
committed
Added option for specifying the plugin by plugin_alias
1 parent 2d7027b commit 411d085

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/puppet/parser/functions/docker_plugin_enable_flags.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ module Puppet::Parser::Functions
1010
opts = args[0] || {}
1111
flags = []
1212
flags << '--force' if opts['force_remove'] == true
13-
flags << "'#{opts['plugin_name']}'" if opts['plugin_name'] && opts['plugin_name'].to_s != 'undef'
13+
if opts['plugin_alias'] && opts['plugin_alias'].to_s != 'undef'
14+
flags << "'#{opts['plugin_alias']}'"
15+
else
16+
flags << "'#{opts['plugin_name']}'" if opts['plugin_name'] && opts['plugin_name'].to_s != 'undef'
17+
end
1418
flags.flatten.join(' ')
1519
end
1620
end

0 commit comments

Comments
 (0)