From e70dfa4dd6c5c1ab779e3fc2a3bfc6f3e8b74c88 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 8 Aug 2022 01:53:48 -0400 Subject: [PATCH] Fix skip message for missing emulators --- main_test.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main_test.go b/main_test.go index 310a92fe..aa96e856 100644 --- a/main_test.go +++ b/main_test.go @@ -259,10 +259,11 @@ func emuCheck(t *testing.T, options compileopts.Options) { t.Fatal("failed to load target spec:", err) } if spec.Emulator != "" { - _, err := exec.LookPath(strings.SplitN(spec.Emulator, " ", 2)[0]) + emulatorCommand := strings.SplitN(spec.Emulator, " ", 2)[0] + _, err := exec.LookPath(emulatorCommand) if err != nil { if errors.Is(err, exec.ErrNotFound) { - t.Skipf("emulator not installed: %q", spec.Emulator[0]) + t.Skipf("emulator not installed: %q", emulatorCommand) } t.Errorf("searching for emulator: %v", err)