M #-: OneProvision array user inputs sep ; (#1119)

This commit is contained in:
Alejandro Huertas Herrero authored and GitHub committed 2021-04-20 16:16:37 +02:00
1 parent 02416dcb00
commit 37bec51c56
1 file changed
+3 -3
@@ -529,7 +529,7 @@ module OneProvision
when 'array'
next unless input['default']
next if input['default'].match(/(\w+)(,\s*\w+)*/)
next if input['default'].match(/(\w+)(;\s*\w+)*/)
return [false, "default #{input['default']} " \
'invalid format']
@@ -675,7 +675,7 @@ module OneProvision
case input['type']
when 'array'
value = []
value << i_value.split(',')
value << i_value.split(';')
value.flatten!
else
value.gsub!("${#{match.join('.')}}", i_value.to_s)
@@ -808,7 +808,7 @@ module OneProvision
when 'array'
answer = ''
until answer.match(/(\w+)(,\s*\w+)*/)
until answer.match(/(\w+)(;\s*\w+)*/)
print "Array `#{input['name']}` " \
"(default=#{input['default']}): "