From 1c33189f38cca8e31e1e90923f39c7de4c06b4da Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 15 Sep 2024 21:17:34 -0700 Subject: [PATCH] Fix test breakage caused by new inconsistency in how GH actions sets the PATH env variable --- client/client_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/client_test.go b/client/client_test.go index 3e2b8be..941aac6 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -838,13 +838,13 @@ func testHishtoryBackgroundSaving(t *testing.T, tester shellTester) { // Setup defer testutils.BackupAndRestore(t)() - // Check that we can find the go binary - _, err := exec.LookPath("go") + // Check that we can find the go binary and use that path to it for consistency + goBinPath, err := exec.LookPath("go") require.NoError(t, err) // Test install with an unset HISHTORY_TEST var so that we save in the background (this is likely to be flakey!) out := tester.RunInteractiveShell(t, `unset HISHTORY_TEST -CGO_ENABLED=0 go build -o /tmp/client +CGO_ENABLED=0 `+goBinPath+` build -o /tmp/client /tmp/client install`) r := regexp.MustCompile(`Setting secret hishtory key to (.*)`) matches := r.FindStringSubmatch(out)