This commit is contained in:
makeworld 2021-12-22 20:39:17 -05:00
parent 034b4c019d
commit d312a801e3
8 changed files with 11 additions and 0 deletions

View File

@ -191,6 +191,7 @@ func open(u string, resp *gemini.Response) {
Error("File Opening Error", "Error executing custom command: "+err.Error()) Error("File Opening Error", "Error executing custom command: "+err.Error())
return return
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
Info("Opened with " + cmd[0]) Info("Opened with " + cmd[0])
return return
@ -221,6 +222,7 @@ func open(u string, resp *gemini.Response) {
Error("File Opening Error", "Error executing custom command: "+err.Error()) Error("File Opening Error", "Error executing custom command: "+err.Error())
return return
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
Info("Opened with " + cmd[0]) Info("Opened with " + cmd[0])
} }

View File

@ -59,6 +59,7 @@ func handleHTTP(u string, showInfo bool) bool {
Error("HTTP Error", "Error executing custom browser command: "+err.Error()) Error("HTTP Error", "Error executing custom browser command: "+err.Error())
return false return false
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
Info("Opened with: " + config.HTTPCommand[0]) Info("Opened with: " + config.HTTPCommand[0])
@ -116,6 +117,7 @@ func handleOther(u string) {
if err != nil { if err != nil {
Error("URL Error", "Error executing custom command: "+err.Error()) Error("URL Error", "Error executing custom command: "+err.Error())
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
Info("Opened with: " + handler[0]) Info("Opened with: " + handler[0])
App.Draw() App.Draw()

View File

@ -12,6 +12,7 @@ func Open(path string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in default system viewer", nil return "Opened in default system viewer", nil
} }

View File

@ -29,6 +29,7 @@ func Open(path string) (string, error) {
if err := proc.Start(); err != nil { if err := proc.Start(); err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in default system viewer", nil return "Opened in default system viewer", nil
default: default:

View File

@ -13,6 +13,7 @@ func Open(path string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in default system viewer", nil return "Opened in default system viewer", nil
} }

View File

@ -12,6 +12,7 @@ func Open(url string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in system default web browser", nil return "Opened in system default web browser", nil
} }

View File

@ -38,6 +38,7 @@ func Open(url string) (string, error) {
if err := proc.Start(); err != nil { if err := proc.Start(); err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in system default web browser", nil return "Opened in system default web browser", nil
case envBrowser != "": case envBrowser != "":
@ -45,6 +46,7 @@ func Open(url string) (string, error) {
if err := proc.Start(); err != nil { if err := proc.Start(); err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in system default web browser", nil return "Opened in system default web browser", nil
default: default:

View File

@ -13,6 +13,7 @@ func Open(url string) (string, error) {
if err != nil { if err != nil {
return "", err return "", err
} }
//nolint:errcheck
go proc.Wait() // Prevent zombies, see #219 go proc.Wait() // Prevent zombies, see #219
return "Opened in system default web browser", nil return "Opened in system default web browser", nil
} }