diff --git a/internal/runners/shell/shell.go b/internal/runners/shell/shell.go index 6a2e26c2d1..23617f3471 100644 --- a/internal/runners/shell/shell.go +++ b/internal/runners/shell/shell.go @@ -1,8 +1,11 @@ package shell import ( + "os" + "github.com/ActiveState/cli/internal/analytics" "github.com/ActiveState/cli/internal/config" + "github.com/ActiveState/cli/internal/constants" "github.com/ActiveState/cli/internal/errs" "github.com/ActiveState/cli/internal/locale" "github.com/ActiveState/cli/internal/logging" @@ -84,7 +87,9 @@ func (u *Shell) Run(params *Params) error { } if process.IsActivated(u.config) { - return locale.NewInputError("err_shell_already_active", "", proj.NamespaceString(), proj.Dir()) + activatedProjectNamespace := os.Getenv(constants.ActivatedStateNamespaceEnvVarName) + activatedProjectDir := os.Getenv(constants.ActivatedStateEnvVarName) + return locale.NewInputError("err_shell_already_active", "", activatedProjectNamespace, activatedProjectDir) } u.out.Notice(locale.Tl("shell_project_statement", "",