From 566914a9c23d5d688ca99376145730a41a998457 Mon Sep 17 00:00:00 2001 From: Reuben Date: Tue, 24 Mar 2020 09:50:26 +0000 Subject: [PATCH] fix RunCommandArray bug where if exec.LookPath returns an error program is an empty string in the log. --- cmd/program.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/program.go b/cmd/program.go index e4313327..733bd51a 100644 --- a/cmd/program.go +++ b/cmd/program.go @@ -138,11 +138,11 @@ func (p *ProgramHelper) RunCommand(command string) error { // RunCommandArray runs the command specified in the array func (p *ProgramHelper) RunCommandArray(args []string, dir ...string) error { - program := args[0] + programCommand := args[0] // TODO: Run FindProgram here and get the full path to the exe - program, err := exec.LookPath(program) + program, err := exec.LookPath(programCommand) if err != nil { - fmt.Printf("ERROR: Looks like '%s' isn't installed. Please install and try again.", program) + fmt.Printf("ERROR: Looks like '%s' isn't installed. Please install and try again.", programCommand) return err }