Repository: conda/conda

Issue:
'conda update --all' causes "'python' is not recognized as an internal or external command"
repro steps:
1. fresh install of latest version of miniconda
2. `conda update --all` and yes to all questions
3. restart 'Anaconda Prompt'

and you will see
```
'python' is not recognized as an internal or external command,
operable program or batch file.
```


Discussion:
And i ran 'conda update --all' again and yes to all questions, shortcut 'Anaconda Prompt' is then removed. I'm totally confused.

Resolving patch:
diff --git a/conda/core/solve.py b/conda/core/solve.py
--- a/conda/core/solve.py
+++ b/conda/core/solve.py
@@ -144,7 +144,11 @@ def solve_final_state(self, deps_modifier=NULL, prune=NULL, ignore_pinned=NULL,
         prefix_data = PrefixData(self.prefix)
         solution = tuple(Dist(d) for d in prefix_data.iter_records())
         specs_from_history_map = History(self.prefix).get_requested_specs_map()
-        if prune or deps_modifier == DepsModifier.UPDATE_ALL:
+        if prune:  # or deps_modifier == DepsModifier.UPDATE_ALL  # pending conda/constructor#138
+            # Users are struggling with the prune functionality in --update-all, due to
+            # https://github.com/conda/constructor/issues/138.  Until that issue is resolved,
+            # and for the foreseeable future, it's best to be more conservative with --update-all.
+
             # Start with empty specs map for UPDATE_ALL because we're optimizing the update
             # only for specs the user has requested; it's ok to remove dependencies.
             specs_map = odict()


Test patch:
diff --git a/tests/core/test_solve.py b/tests/core/test_solve.py
--- a/tests/core/test_solve.py
+++ b/tests/core/test_solve.py
@@ -1058,28 +1058,29 @@ def test_pinned_1():
             )
             assert tuple(final_state_5) == tuple(solver._index[Dist(d)] for d in order)
 
-    # now update without pinning
-    specs_to_add = MatchSpec("python"),
-    history_specs = MatchSpec("python"), MatchSpec("system=5.8=0"), MatchSpec("numba"),
-    with get_solver(specs_to_add=specs_to_add, prefix_records=final_state_4,
-                    history_specs=history_specs) as solver:
-        final_state_5 = solver.solve_final_state(deps_modifier=DepsModifier.UPDATE_ALL)
-        # PrefixDag(final_state_1, specs).open_url()
-        print([Dist(rec).full_name for rec in final_state_5])
-        order = (
-            'channel-1::openssl-1.0.1c-0',
-            'channel-1::readline-6.2-0',
-            'channel-1::sqlite-3.7.13-0',
-            'channel-1::system-5.8-1',
-            'channel-1::tk-8.5.13-0',
-            'channel-1::zlib-1.2.7-0',
-            'channel-1::llvm-3.2-0',
-            'channel-1::python-3.3.2-0',
-            'channel-1::llvmpy-0.11.2-py33_0',
-            'channel-1::numpy-1.7.1-py33_0',
-            'channel-1::numba-0.8.1-np17py33_0',
-        )
-        assert tuple(final_state_5) == tuple(solver._index[Dist(d)] for d in order)
+    # # TODO: re-enable when UPDATE_ALL gets prune behavior again, following completion of https://github.com/conda/constructor/issues/138
+    # # now update without pinning
+    # specs_to_add = MatchSpec("python"),
+    # history_specs = MatchSpec("python"), MatchSpec("system=5.8=0"), MatchSpec("numba"),
+    # with get_solver(specs_to_add=specs_to_add, prefix_records=final_state_4,
+    #                 history_specs=history_specs) as solver:
+    #     final_state_5 = solver.solve_final_state(deps_modifier=DepsModifier.UPDATE_ALL)
+    #     # PrefixDag(final_state_1, specs).open_url()
+    #     print([Dist(rec).full_name for rec in final_state_5])
+    #     order = (
+    #         'channel-1::openssl-1.0.1c-0',
+    #         'channel-1::readline-6.2-0',
+    #         'channel-1::sqlite-3.7.13-0',
+    #         'channel-1::system-5.8-1',
+    #         'channel-1::tk-8.5.13-0',
+    #         'channel-1::zlib-1.2.7-0',
+    #         'channel-1::llvm-3.2-0',
+    #         'channel-1::python-3.3.2-0',
+    #         'channel-1::llvmpy-0.11.2-py33_0',
+    #         'channel-1::numpy-1.7.1-py33_0',
+    #         'channel-1::numba-0.8.1-np17py33_0',
+    #     )
+    #     assert tuple(final_state_5) == tuple(solver._index[Dist(d)] for d in order)
 
 
 def test_no_update_deps_1():  # i.e. FREEZE_DEPS