From 9698b875ec063d749a55d89426bea470dc5e9877 Mon Sep 17 00:00:00 2001 From: mitchell Date: Tue, 9 Jan 2024 13:23:43 -0500 Subject: [PATCH] Do not attempt to reset executors for a default project that no longer exists. --- internal/runners/prepare/prepare.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/runners/prepare/prepare.go b/internal/runners/prepare/prepare.go index f4050c4f74..17d9feae59 100644 --- a/internal/runners/prepare/prepare.go +++ b/internal/runners/prepare/prepare.go @@ -11,6 +11,7 @@ import ( "github.com/ActiveState/cli/internal/config" "github.com/ActiveState/cli/internal/constants" "github.com/ActiveState/cli/internal/errs" + "github.com/ActiveState/cli/internal/fileutils" "github.com/ActiveState/cli/internal/globaldefault" "github.com/ActiveState/cli/internal/installation" "github.com/ActiveState/cli/internal/installation/storage" @@ -62,7 +63,7 @@ func New(prime primeable) *Prepare { // This ensures that the installation is compatible with an updated State Tool installation func (r *Prepare) resetExecutors() error { defaultProjectDir := r.cfg.GetString(constants.GlobalDefaultPrefname) - if defaultProjectDir == "" { + if defaultProjectDir == "" || !fileutils.TargetExists(defaultProjectDir) { return nil }