Bug 714

Summary: editor option executes in reverse order
Product: Sudo Reporter: James Nelson <jnlson>
Component: SudoersAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: low    
Priority: low    
Version: 1.8.14   
Hardware: PC   
OS: Linux   
Attachments: Stop after finding the first valid editor

Description James Nelson 2015-08-21 11:13:44 MDT
Defaults editor = "/usr/bin/nano:/usr/bin/vim"

Currently this would execute vim first and then nano if vim couldn't be found. My EDITOR, SUDO_EDITOR, and VISUAL environment variables are undefined. If I define one of those, it correctly uses what I defined the variable with.
Comment 1 Todd C. Miller 2015-08-21 11:22:17 MDT
Created attachment 457 [details]
Stop after finding the first valid editor

The attached patch fixes the problem.
Comment 2 Todd C. Miller 2015-11-01 15:26:31 MST
Fixed in sudo 1.8.15