Update finalize method for run and run_remote objects

This commit is contained in:
Brian Cain 2018-03-16 14:06:39 -07:00
parent d3dde739fe
commit e752878de9
No known key found for this signature in database
GPG Key ID: 43D51080D357A001
1 changed files with 5 additions and 3 deletions

View File

@ -98,17 +98,19 @@ module VagrantPlugins
# these values are expected to always be an Array internally,
# but can be set as a single String or Symbol
#
# map to all be strings
# Guests are stored internally as strings
if !@only_on.nil?
@only_on = Array(@only_on)
@only_on.map { |o| o.to_s }
end
# Commands must be stored internally as symbols
if !@ignore.nil?
@ignore = @ignore.to_sym if @ignore.is_a?(String)
@ignore = Array(@ignore)
@ignore.map { |i| i.to_sym }
end
# Convert @run and @run_remote to be a "Shell provisioner"
# Convert @run and @run_remote to be a "Shell provisioner" config
if @run
new_run = VagrantPlugins::Shell::Config.new()
new_run.set_options(@run)