Repository: conda/conda

Issue:
post-link scripts are unable to call entrypoints
Using the latest combination of conda and conda-build packages fail to execute anything under bin/ (this folder doesn't exist in this phase). See https://github.com/conda-forge/jupyterlab_code_formatter-feedstock/pull/2 with build log https://dev.azure.com/conda-forge/feedstock-builds/_build/results?buildId=49083&view=logs&jobId=1bf226d3-0e2f-52d8-fa93-7d9e633347b3 for example failure.

Going through the changelog of both, the only possible PR affecting this could be https://github.com/conda/conda/pull/8833/files

`conda-info`:

```
     active environment : base
    active env location : /Users/uwe/miniconda3
            shell level : 1
       user config file : /Users/uwe/.condarc
 populated config files : /Users/uwe/.condarc
          conda version : 4.7.6
    conda-build version : 3.18.7
         python version : 3.7.3.final.0
       virtual packages :
       base environment : /Users/uwe/miniconda3  (writable)
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/uwe/miniconda3/pkgs
                          /Users/uwe/.conda/pkgs
       envs directories : /Users/uwe/miniconda3/envs
                          /Users/uwe/.conda/envs
               platform : osx-64
             user-agent : conda/4.7.6 requests/2.22.0 CPython/3.7.3 Darwin/18.6.0 OSX/10.14.5
                UID:GID : 501:20
             netrc file : None
           offline mode : False
``` 


Discussion:

Resolving patch:
diff --git a/conda/core/link.py b/conda/core/link.py
--- a/conda/core/link.py
+++ b/conda/core/link.py
@@ -602,6 +602,11 @@ def _execute(self, all_action_groups):
                         if exc:
                             exceptions.append(exc)
 
+                    # post link scripts may employ entry points.  Do them before post-link.
+                    if install_side:
+                        for axngroup in entry_point_actions:
+                            UnlinkLinkTransaction._execute_actions(axngroup)
+
                     # Run post-link or post-unlink scripts and registering AFTER link/unlink,
                     #    because they may depend on files in the prefix.  Additionally, run
                     #    them serially, just in case order matters (hopefully not)
@@ -613,10 +618,6 @@ def _execute(self, all_action_groups):
                     # parallel block 2:
                     futures = []
                     if install_side:
-                        futures.extend(
-                            self.executor.submit(UnlinkLinkTransaction._execute_actions, axngroup)
-                            for axngroup in entry_point_actions)
-
                         # consolidate compile actions into one big'un for better efficiency
                         individual_actions = [axn for ag in compile_actions for axn in ag.actions]
                         if individual_actions:


Test patch: