With this change, the `raw_arguments` and `raw_ssh_args` options are: - STILL automatically converted as an Array when they are set a String (no behaviour change) - rejected if they are not of Array data type otherwise Additional Notes: - the 'as_array' tiny helper has been removed since it was no longer used. - there is for now no deeper validation (i.e. verifying that the Array elements are only *String* objects)
17 lines
434 B
Ruby
17 lines
434 B
Ruby
require "vagrant"
|
|
|
|
module VagrantPlugins
|
|
module Ansible
|
|
class Helpers
|
|
def self.expand_path_in_unix_style(path, base_dir)
|
|
# Remove the possible drive letter, which is added
|
|
# by `File.expand_path` when running on a Windows host
|
|
File.expand_path(path, base_dir).sub(/^[a-zA-Z]:/, "")
|
|
end
|
|
|
|
def self.as_list_argument(v)
|
|
v.kind_of?(Array) ? v.join(',') : v
|
|
end
|
|
end
|
|
end
|
|
end |