From 1a3f4f2e44fe3c65faa52590e39939d501ea3678 Mon Sep 17 00:00:00 2001 From: Jason Ross Date: Thu, 11 Jun 2026 11:36:26 -0500 Subject: [PATCH] unit test fix to mock successful package install return codes --- progress_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/progress_test.go b/progress_test.go index 9bc4e87..ad7ac50 100644 --- a/progress_test.go +++ b/progress_test.go @@ -185,6 +185,15 @@ func TestRunMainStep0TransitionToStep2(t *testing.T) { } return nil } + osStat = func(name string) (os.FileInfo, error) { + if strings.HasSuffix(name, "/go") || + strings.HasSuffix(name, "/firecracker") || + strings.HasSuffix(name, "/nvim") || + strings.HasSuffix(name, ".oh-my-zsh") { + return nil, nil + } + return nil, os.ErrNotExist + } hasCmd = func(name string) bool { return true // all installed