mirror of
				https://github.com/sammy-ette/Hilbish
				synced 2025-08-10 02:52:03 +00:00 
			
		
		
		
	feat: add command.not-executable hook (closes #119)
This commit is contained in:
		
							parent
							
								
									20a4cdb505
								
							
						
					
					
						commit
						8b5dc69950
					
				
							
								
								
									
										1
									
								
								exec.go
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								exec.go
									
									
									
									
									
								
							@ -142,6 +142,7 @@ func execCommand(cmd, old string) error {
 | 
				
			|||||||
		err := lookpath(args[0])
 | 
							err := lookpath(args[0])
 | 
				
			||||||
		if err == errNotExec {
 | 
							if err == errNotExec {
 | 
				
			||||||
			hooks.Em.Emit("command.no-perm", args[0])
 | 
								hooks.Em.Emit("command.no-perm", args[0])
 | 
				
			||||||
 | 
								hooks.Em.Emit("command.not-executable", args[0])
 | 
				
			||||||
			return interp.NewExitStatus(126)
 | 
								return interp.NewExitStatus(126)
 | 
				
			||||||
		} else if err != nil {
 | 
							} else if err != nil {
 | 
				
			||||||
			hooks.Em.Emit("command.not-found", args[0])
 | 
								hooks.Em.Emit("command.not-found", args[0])
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user