scripts: update need_string_array() to work as expected
This commit is contained in:
		
							parent
							
								
									21e033213c
								
							
						
					
					
						commit
						4d98fbb1bb
					
				| @ -133,8 +133,9 @@ function need_one_of(varname, array, required) | |||||||
| end | end | ||||||
| 
 | 
 | ||||||
| function need_string_array(varname, required) | function need_string_array(varname, required) | ||||||
|    return assert(pcall(need_array, varname, function(e) assert_type(e, 'string') end, required), |    local ok, var = pcall(need_array, varname, function(e) assert_type(e, 'string') end, required) | ||||||
| 		 "site.conf error: expected `" .. varname .. "' to be a string array") |    assert(ok, "site.conf error: expected `" .. varname .. "' to be a string array") | ||||||
|  |    return var | ||||||
| end | end | ||||||
| 
 | 
 | ||||||
| function need_array_of(varname, array, required) | function need_array_of(varname, array, required) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user