Skip to content

Commit

Permalink
[Bug] fix #2538
Browse files Browse the repository at this point in the history
  • Loading branch information
derailed committed Feb 15, 2024
1 parent c728443 commit c322761
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions internal/view/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,11 @@ func edit(a *App, opts shellOpts) bool {
)
for _, e := range editorEnvVars {
env := os.Getenv(e)
if env != "" {
if env == "" {
continue
}
bin, err = exec.LookPath(env)
if err != nil {
continue
if bin, err = exec.LookPath(env); err == nil {
break
}
}
if bin == "" {
Expand Down

0 comments on commit c322761

Please sign in to comment.