From d790b7783ea8a7dd35c5f7c095726e2e86ff0e88 Mon Sep 17 00:00:00 2001 From: Rebecca Mahany-Horton Date: Tue, 14 Nov 2023 10:36:49 -0500 Subject: [PATCH] Fix etxtbsy check --- pkg/autoupdate/findnew.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/autoupdate/findnew.go b/pkg/autoupdate/findnew.go index 6fbf65058..90f307999 100644 --- a/pkg/autoupdate/findnew.go +++ b/pkg/autoupdate/findnew.go @@ -383,7 +383,7 @@ func CheckExecutable(ctx context.Context, potentialBinary string, args ...string cmd.Env = append(cmd.Env, "LAUNCHER_SKIP_UPDATES=TRUE") execErr := cmd.Run() - if execErr != nil && errors.Is(ctx.Err(), syscall.ETXTBSY) { + if execErr != nil && errors.Is(execErr, syscall.ETXTBSY) { continue } @@ -394,7 +394,7 @@ func CheckExecutable(ctx context.Context, potentialBinary string, args ...string return supressRoutineErrors(execErr) } - return fmt.Errorf("could not exec %s -- text file busy", potentialBinary) + return fmt.Errorf("could not exec %s despite retries due to text file busy", potentialBinary) } // supressRoutineErrors attempts to tell whether the error was a