Panic on environment errors instead of log.Fatalf
This commit is contained in:
		@@ -4,7 +4,6 @@ import (
 | 
			
		||||
	"fmt"
 | 
			
		||||
	"os/exec"
 | 
			
		||||
	"strings"
 | 
			
		||||
	"log"
 | 
			
		||||
	"regexp"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
@@ -48,7 +47,7 @@ func executeTransShell(tj TransJob) ([]byte, error) {
 | 
			
		||||
func (t Translation) Translate() []string {
 | 
			
		||||
	outBytes, err := t.Executor(t.job)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		log.Fatalf("Failed to execute command 'trans': %v", err)
 | 
			
		||||
		panic(err)
 | 
			
		||||
	}
 | 
			
		||||
	return uniqueSlice(parseTransOutput(string(outBytes)))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user