mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
fix RunCommandArray bug where if exec.LookPath returns an error program is an empty string in the log.
This commit is contained in:
@@ -138,11 +138,11 @@ func (p *ProgramHelper) RunCommand(command string) error {
|
|||||||
|
|
||||||
// RunCommandArray runs the command specified in the array
|
// RunCommandArray runs the command specified in the array
|
||||||
func (p *ProgramHelper) RunCommandArray(args []string, dir ...string) error {
|
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
|
// 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 {
|
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
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user