Skip to content

Commit

Permalink
Fix test breakage caused by new inconsistency in how GH actions sets …
Browse files Browse the repository at this point in the history
…the PATH env variable
  • Loading branch information
ddworken committed Sep 16, 2024
1 parent 3987b35 commit 1c33189
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1c33189

Please sign in to comment.