@@ -30,6 +30,20 @@ class Snapshot(Enum):
3030 def __str__ (self ) -> str :
3131 return self .value
3232
33+ @property
34+ def display_name (self ) -> str :
35+ match self :
36+ case Snapshot .CURRENT :
37+ return "current"
38+ case Snapshot .INSTALLER :
39+ return "installer"
40+ case Snapshot .INSTALLER_EXACT :
41+ return "installer-provided (exact)"
42+ case Snapshot .INSTALLER_UPDATED :
43+ return "installer-provided (with updates)"
44+ case Snapshot .BASE_PROTECTION :
45+ return "base-protection"
46+
3347 @property
3448 def file_path (self ) -> Path | None :
3549 """The ``conda-meta/*.txt`` file this snapshot mode reads, if any."""
@@ -142,13 +156,13 @@ def execute(args: argparse.Namespace) -> int:
142156
143157 if not context .json and not context .quiet :
144158 if snapshot is not None :
145- print (WHAT_TO_EXPECT_SNAPSHOT .format (mode_name = snapshot ))
159+ print (WHAT_TO_EXPECT_SNAPSHOT .format (mode_name = snapshot . display_name ))
146160 else :
147161 print (WHAT_TO_EXPECT_CURRENT )
148162
149163 prompt = "Proceed with resetting the base environment"
150164 if snapshot is not None :
151- prompt += f" using the '{ snapshot } ' mode"
165+ prompt += f" using the '{ snapshot . display_name } ' mode"
152166 confirm_yn (f"{ prompt } ?[y/n]:\n " , default = "no" , dry_run = context .dry_run )
153167
154168 if not context .json and not context .quiet :
@@ -169,7 +183,7 @@ def execute(args: argparse.Namespace) -> int:
169183 stdout_json_success ()
170184 elif not context .quiet :
171185 if snapshot is not None :
172- print (SUCCESS_SNAPSHOT .format (mode_name = snapshot ))
186+ print (SUCCESS_SNAPSHOT .format (mode_name = snapshot . display_name ))
173187 else :
174188 print (SUCCESS )
175189
0 commit comments