mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	fix: allow function arg to add runner
This commit is contained in:
		
							parent
							
								
									dce49574e6
								
							
						
					
					
						commit
						f6c98d5bc0
					
				| @ -17,8 +17,12 @@ function runnerHandler.add(name, runner) | ||||
| 		error 'expected runner name to be a table' | ||||
| 	end | ||||
| 
 | ||||
| 	if type(runner) == 'function' then | ||||
| 		runner = {run = runner} -- this probably looks confusing | ||||
| 	end | ||||
| 
 | ||||
| 	if type(runner) ~= 'table' then | ||||
| 		error 'expected runner to be a table' | ||||
| 		error 'expected runner to be a table or function' | ||||
| 	end | ||||
| 
 | ||||
| 	if runners[name] then | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user