Skip to content

Commit

Permalink
Do not attempt to reset executors for a default project that no longe…
Browse files Browse the repository at this point in the history
…r exists.
  • Loading branch information
mitchell-as committed Jan 9, 2024
1 parent bb5c00f commit 9698b87
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/runners/prepare/prepare.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}

Expand Down

0 comments on commit 9698b87

Please sign in to comment.