We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
'conda create --dry-run --yes' deletes existing environment. 
## Current Behavior
If `--dry-run` and `--yes` are _both_ passed to `conda create`, and the named environment already exists, the named environment is deleted. 


### Steps to Reproduce
```
# create the env
conda create -n tmp -y 
conda env list | grep tmp

# --dry-run without --yes leaves env in place
conda create -n tmp --dry-run
conda env list | grep tmp

# --dry-run with --yes deletes the env
conda create -n tmp --dry-run --yes
conda env list | grep tmp

```


## Expected Behavior
'conda create --dry-run' should not delete an existing environment. 

## Environment Information
<details open><summary><code>`conda info`</code></summary><p>

```
     active environment : garpy.conda-dev
    active env location : /Users/aschweit/miniconda3/envs/garpy.conda-dev
            shell level : 2
       user config file : /Users/aschweit/.condarc
 populated config files : /Users/aschweit/.condarc
          conda version : 4.8.2
    conda-build version : 3.19.2
         python version : 3.7.6.final.0
       virtual packages : __osx=10.14.6
       base environment : /Users/aschweit/miniconda3  (writable)
           channel URLs : 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/aschweit/miniconda3/pkgs
                          /Users/aschweit/.conda/pkgs
       envs directories : /Users/aschweit/miniconda3/envs
                          /Users/aschweit/.conda/envs
               platform : osx-64
             user-agent : conda/4.8.2 requests/2.23.0 CPython/3.7.6 Darwin/18.7.0 OSX/10.14.6
                UID:GID : 501:20
             netrc file : None
           offline mode : False

```
</p></details>


<details open><summary><code>`conda config --show-sources`</code></summary><p>

```
==> /Users/aschweit/.condarc <==
auto_update_conda: False
auto_stack: 1
```
</p></details>


<details><summary><code>`conda list --show-channel-urls`</code></summary><p>

```
# packages in environment at /Users/aschweit/miniconda3:
#
# Name                    Version                   Build  Channel
appdirs                   1.4.3                      py_1    conda-forge
arrow                     0.15.6           py37hc8dfbb8_1    conda-forge
attrs                     19.3.0                     py_0    conda-forge
beautifulsoup4            4.9.0            py37hc8dfbb8_0    conda-forge
binaryornot               0.4.4                      py_1    conda-forge
black                     19.10b0                  py37_0    conda-forge
bleach                    3.1.4                      py_0    defaults
brotlipy                  0.7.0           py37h9bfed18_1000    conda-forge
bzip2                     1.0.8                h0b31af3_2    conda-forge
ca-certificates           2020.4.5.1           hecc5488_0    conda-forge
certifi                   2020.4.5.1       py37hc8dfbb8_0    conda-forge
cffi                      1.14.0           py37h356ff06_0    conda-forge
chardet                   3.0.4           py37hc8dfbb8_1006    conda-forge
click                     7.1.2              pyh9f0ad1d_0    conda-forge
cmarkgfm                  0.4.2            py37h1de35cc_0    defaults
conda                     4.8.2                    py37_0    defaults
conda-build               3.19.2           py37hc8dfbb8_2    conda-forge
conda-package-handling    1.6.0            py37h9bfed18_2    conda-forge
cookiecutter              1.7.2              pyh9f0ad1d_0    conda-forge
cryptography              2.9.2            py37he655712_0    conda-forge
curl                      7.69.1               ha441bb4_0    defaults
decorator                 4.4.2                      py_0    defaults
docutils                  0.16                     py37_0    defaults
expat                     2.2.9                h4a8c4bd_2    conda-forge
filelock                  3.0.10                     py_0    conda-forge
future                    0.18.2                   py37_0    defaults
gettext                   0.19.8.1          h46ab8bc_1002    conda-forge
git                       2.26.2          pl526hcc376a2_0    conda-forge
glob2                     0.7                        py_0    conda-forge
icu                       67.1                 h4a8c4bd_0    conda-forge
idna                      2.9                        py_1    conda-forge
importlib-metadata        1.6.0            py37hc8dfbb8_0    conda-forge
importlib_metadata        1.6.0                         0    conda-forge
jinja2                    2.11.2             pyh9f0ad1d_0    conda-forge
jinja2-time               0.2.0                      py_2    conda-forge
krb5                      1.17.1               hddcf347_0    defaults
libarchive                3.3.3             h02796b4_1008    conda-forge
libcurl                   7.69.1               h051b688_0    defaults
libcxx                    10.0.0               h1af66ff_2    conda-forge
libedit                   3.1.20181209         hb402a30_0    defaults
libffi                    3.2.1             h4a8c4bd_1007    conda-forge
libiconv                  1.15              h0b31af3_1006    conda-forge
liblief                   0.9.0                h3e78482_1    conda-forge
libssh2                   1.9.0                ha12b0ac_1    defaults
libxml2                   2.9.10               hc06c4ae_1    conda-forge
lz4-c                     1.9.2                h4a8c4bd_1    conda-forge
lzo                       2.10              h1de35cc_1000    conda-forge
markupsafe                1.1.1            py37h9bfed18_1    conda-forge
mypy_extensions           0.4.3            py37hc8dfbb8_1    conda-forge
ncurses                   6.1               h0a44026_1002    conda-forge
networkx                  2.4                        py_0    defaults
openssl                   1.1.1g               h0b31af3_0    conda-forge
packaging                 20.1                       py_0    conda-forge
pathspec                  0.8.0              pyh9f0ad1d_0    conda-forge
pcre                      8.44                 h4a8c4bd_0    conda-forge
perl                      5.26.2            haec8ef5_1006    conda-forge
pip                       20.1               pyh9f0ad1d_0    conda-forge
pkginfo                   1.5.0.1                    py_0    conda-forge
pluggy                    0.13.1           py37hc8dfbb8_1    conda-forge
poyo                      0.5.0                      py_0    conda-forge
psutil                    5.7.0            py37h9bfed18_1    conda-forge
py                        1.8.1                      py_0    conda-forge
py-lief                   0.9.0            py37h0ceac7d_1    conda-forge
pycosat                   0.6.3           py37h9bfed18_1004    conda-forge
pycparser                 2.20                       py_0    conda-forge
pygments                  2.6.1                      py_0    defaults
pyopenssl                 19.1.0                     py_1    conda-forge
pyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge
pysocks                   1.7.1            py37hc8dfbb8_1    conda-forge
python                    3.7.6                h359304d_2    defaults
python-dateutil           2.8.1                      py_0    conda-forge
python-libarchive-c       2.9                      py37_0    conda-forge
python-slugify            4.0.0              pyh9f0ad1d_1    conda-forge
python.app                2                       py37_10    defaults
python_abi                3.7                     1_cp37m    conda-forge
pytz                      2020.1             pyh9f0ad1d_0    conda-forge
pyyaml                    5.3.1            py37h9bfed18_0    conda-forge
readline                  7.0               hcfe32e1_1001    conda-forge
readme_renderer           24.0                     py37_0    defaults
regex                     2020.5.14        py37h9bfed18_0    conda-forge
requests                  2.23.0             pyh8c360ce_2    conda-forge
requests-toolbelt         0.9.1                      py_0    defaults
ripgrep                   12.1.0               h0b31af3_0    conda-forge
ruamel_yaml               0.15.80         py37h9bfed18_1001    conda-forge
setuptools                46.3.0           py37hc8dfbb8_0    conda-forge
six                       1.14.0                     py_1    conda-forge
soupsieve                 1.9.4            py37hc8dfbb8_1    conda-forge
sqlite                    3.31.1               ha441bb4_0    defaults
text-unidecode            1.3                        py_0    conda-forge
tk                        8.6.10               hbbe82c9_0    conda-forge
toml                      0.10.0                     py_0    conda-forge
tox                       3.15.0           py37hc8dfbb8_0    conda-forge
tox-conda                 0.2.1                      py_0    conda-forge
tqdm                      4.46.0             pyh9f0ad1d_0    conda-forge
tree                      1.8.0                h0b31af3_1    conda-forge
twine                     2.0.0                      py_0    defaults
typed-ast                 1.4.1            py37h0b31af3_0    conda-forge
typing_extensions         3.7.4.2                    py_0    conda-forge
unidecode                 1.1.1                      py_0    conda-forge
urllib3                   1.25.9                     py_0    conda-forge
virtualenv                16.7.5                     py_0    conda-forge
webencodings              0.5.1                    py37_1    defaults
wheel                     0.34.2                     py_1    conda-forge
whichcraft                0.6.1                      py_0    conda-forge
xz                        5.2.5                h0b31af3_0    conda-forge
yaml                      0.2.4                h0b31af3_0    conda-forge
zipp                      3.1.0                      py_0    conda-forge
zlib                      1.2.11            h0b31af3_1006    conda-forge
zstd                      1.4.4                h4b3e974_3    conda-forge

```
</p></details>


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conda/cli/main_create.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2012 Anaconda, Inc
3 # SPDX-License-Identifier: BSD-3-Clause
4 from __future__ import absolute_import, division, print_function, unicode_literals
5 
6 from logging import getLogger
7 from os.path import isdir
8 
9 from .common import confirm_yn
10 from .install import install
11 from ..base.context import context
12 from ..common.path import paths_equal
13 from ..exceptions import CondaValueError
14 from ..gateways.disk.delete import rm_rf
15 from ..gateways.disk.test import is_conda_environment
16 
17 log = getLogger(__name__)
18 
19 
20 def execute(args, parser):
21     if is_conda_environment(context.target_prefix):
22         if paths_equal(context.target_prefix, context.root_prefix):
23             raise CondaValueError("The target prefix is the base prefix. Aborting.")
24         confirm_yn("WARNING: A conda environment already exists at '%s'\n"
25                    "Remove existing environment" % context.target_prefix,
26                    default='no',
27                    dry_run=False)
28         log.info("Removing existing environment %s", context.target_prefix)
29         rm_rf(context.target_prefix)
30     elif isdir(context.target_prefix):
31         confirm_yn("WARNING: A directory already exists at the target location '%s'\n"
32                    "but it is not a conda environment.\n"
33                    "Continue creating environment" % context.target_prefix,
34                    default='no',
35                    dry_run=False)
36 
37     install(args, parser, 'create')
38
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/conda/cli/main_create.py b/conda/cli/main_create.py
--- a/conda/cli/main_create.py
+++ b/conda/cli/main_create.py
@@ -21,6 +21,10 @@
     if is_conda_environment(context.target_prefix):
         if paths_equal(context.target_prefix, context.root_prefix):
             raise CondaValueError("The target prefix is the base prefix. Aborting.")
+        if context.dry_run:
+            # Taking the "easy" way out, rather than trying to fake removing
+            # the existing environment before creating a new one.
+            raise CondaValueError("Cannot `create --dry-run` with an existing conda environment")
         confirm_yn("WARNING: A conda environment already exists at '%s'\n"
                    "Remove existing environment" % context.target_prefix,
                    default='no',

{"golden_diff": "diff --git a/conda/cli/main_create.py b/conda/cli/main_create.py\n--- a/conda/cli/main_create.py\n+++ b/conda/cli/main_create.py\n@@ -21,6 +21,10 @@\n     if is_conda_environment(context.target_prefix):\n         if paths_equal(context.target_prefix, context.root_prefix):\n             raise CondaValueError(\"The target prefix is the base prefix. Aborting.\")\n+        if context.dry_run:\n+            # Taking the \"easy\" way out, rather than trying to fake removing\n+            # the existing environment before creating a new one.\n+            raise CondaValueError(\"Cannot `create --dry-run` with an existing conda environment\")\n         confirm_yn(\"WARNING: A conda environment already exists at '%s'\\n\"\n                    \"Remove existing environment\" % context.target_prefix,\n                    default='no',\n", "issue": "'conda create --dry-run --yes' deletes existing environment. \n## Current Behavior\r\nIf `--dry-run` and `--yes` are _both_ passed to `conda create`, and the named environment already exists, the named environment is deleted. \r\n\r\n\r\n### Steps to Reproduce\r\n```\r\n# create the env\r\nconda create -n tmp -y \r\nconda env list | grep tmp\r\n\r\n# --dry-run without --yes leaves env in place\r\nconda create -n tmp --dry-run\r\nconda env list | grep tmp\r\n\r\n# --dry-run with --yes deletes the env\r\nconda create -n tmp --dry-run --yes\r\nconda env list | grep tmp\r\n\r\n```\r\n\r\n\r\n## Expected Behavior\r\n'conda create --dry-run' should not delete an existing environment. \r\n\r\n## Environment Information\r\n<details open><summary><code>`conda info`</code></summary><p>\r\n\r\n```\r\n     active environment : garpy.conda-dev\r\n    active env location : /Users/aschweit/miniconda3/envs/garpy.conda-dev\r\n            shell level : 2\r\n       user config file : /Users/aschweit/.condarc\r\n populated config files : /Users/aschweit/.condarc\r\n          conda version : 4.8.2\r\n    conda-build version : 3.19.2\r\n         python version : 3.7.6.final.0\r\n       virtual packages : __osx=10.14.6\r\n       base environment : /Users/aschweit/miniconda3  (writable)\r\n           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64\r\n                          https://repo.anaconda.com/pkgs/main/noarch\r\n                          https://repo.anaconda.com/pkgs/r/osx-64\r\n                          https://repo.anaconda.com/pkgs/r/noarch\r\n          package cache : /Users/aschweit/miniconda3/pkgs\r\n                          /Users/aschweit/.conda/pkgs\r\n       envs directories : /Users/aschweit/miniconda3/envs\r\n                          /Users/aschweit/.conda/envs\r\n               platform : osx-64\r\n             user-agent : conda/4.8.2 requests/2.23.0 CPython/3.7.6 Darwin/18.7.0 OSX/10.14.6\r\n                UID:GID : 501:20\r\n             netrc file : None\r\n           offline mode : False\r\n\r\n```\r\n</p></details>\r\n\r\n\r\n<details open><summary><code>`conda config --show-sources`</code></summary><p>\r\n\r\n```\r\n==> /Users/aschweit/.condarc <==\r\nauto_update_conda: False\r\nauto_stack: 1\r\n```\r\n</p></details>\r\n\r\n\r\n<details><summary><code>`conda list --show-channel-urls`</code></summary><p>\r\n\r\n```\r\n# packages in environment at /Users/aschweit/miniconda3:\r\n#\r\n# Name                    Version                   Build  Channel\r\nappdirs                   1.4.3                      py_1    conda-forge\r\narrow                     0.15.6           py37hc8dfbb8_1    conda-forge\r\nattrs                     19.3.0                     py_0    conda-forge\r\nbeautifulsoup4            4.9.0            py37hc8dfbb8_0    conda-forge\r\nbinaryornot               0.4.4                      py_1    conda-forge\r\nblack                     19.10b0                  py37_0    conda-forge\r\nbleach                    3.1.4                      py_0    defaults\r\nbrotlipy                  0.7.0           py37h9bfed18_1000    conda-forge\r\nbzip2                     1.0.8                h0b31af3_2    conda-forge\r\nca-certificates           2020.4.5.1           hecc5488_0    conda-forge\r\ncertifi                   2020.4.5.1       py37hc8dfbb8_0    conda-forge\r\ncffi                      1.14.0           py37h356ff06_0    conda-forge\r\nchardet                   3.0.4           py37hc8dfbb8_1006    conda-forge\r\nclick                     7.1.2              pyh9f0ad1d_0    conda-forge\r\ncmarkgfm                  0.4.2            py37h1de35cc_0    defaults\r\nconda                     4.8.2                    py37_0    defaults\r\nconda-build               3.19.2           py37hc8dfbb8_2    conda-forge\r\nconda-package-handling    1.6.0            py37h9bfed18_2    conda-forge\r\ncookiecutter              1.7.2              pyh9f0ad1d_0    conda-forge\r\ncryptography              2.9.2            py37he655712_0    conda-forge\r\ncurl                      7.69.1               ha441bb4_0    defaults\r\ndecorator                 4.4.2                      py_0    defaults\r\ndocutils                  0.16                     py37_0    defaults\r\nexpat                     2.2.9                h4a8c4bd_2    conda-forge\r\nfilelock                  3.0.10                     py_0    conda-forge\r\nfuture                    0.18.2                   py37_0    defaults\r\ngettext                   0.19.8.1          h46ab8bc_1002    conda-forge\r\ngit                       2.26.2          pl526hcc376a2_0    conda-forge\r\nglob2                     0.7                        py_0    conda-forge\r\nicu                       67.1                 h4a8c4bd_0    conda-forge\r\nidna                      2.9                        py_1    conda-forge\r\nimportlib-metadata        1.6.0            py37hc8dfbb8_0    conda-forge\r\nimportlib_metadata        1.6.0                         0    conda-forge\r\njinja2                    2.11.2             pyh9f0ad1d_0    conda-forge\r\njinja2-time               0.2.0                      py_2    conda-forge\r\nkrb5                      1.17.1               hddcf347_0    defaults\r\nlibarchive                3.3.3             h02796b4_1008    conda-forge\r\nlibcurl                   7.69.1               h051b688_0    defaults\r\nlibcxx                    10.0.0               h1af66ff_2    conda-forge\r\nlibedit                   3.1.20181209         hb402a30_0    defaults\r\nlibffi                    3.2.1             h4a8c4bd_1007    conda-forge\r\nlibiconv                  1.15              h0b31af3_1006    conda-forge\r\nliblief                   0.9.0                h3e78482_1    conda-forge\r\nlibssh2                   1.9.0                ha12b0ac_1    defaults\r\nlibxml2                   2.9.10               hc06c4ae_1    conda-forge\r\nlz4-c                     1.9.2                h4a8c4bd_1    conda-forge\r\nlzo                       2.10              h1de35cc_1000    conda-forge\r\nmarkupsafe                1.1.1            py37h9bfed18_1    conda-forge\r\nmypy_extensions           0.4.3            py37hc8dfbb8_1    conda-forge\r\nncurses                   6.1               h0a44026_1002    conda-forge\r\nnetworkx                  2.4                        py_0    defaults\r\nopenssl                   1.1.1g               h0b31af3_0    conda-forge\r\npackaging                 20.1                       py_0    conda-forge\r\npathspec                  0.8.0              pyh9f0ad1d_0    conda-forge\r\npcre                      8.44                 h4a8c4bd_0    conda-forge\r\nperl                      5.26.2            haec8ef5_1006    conda-forge\r\npip                       20.1               pyh9f0ad1d_0    conda-forge\r\npkginfo                   1.5.0.1                    py_0    conda-forge\r\npluggy                    0.13.1           py37hc8dfbb8_1    conda-forge\r\npoyo                      0.5.0                      py_0    conda-forge\r\npsutil                    5.7.0            py37h9bfed18_1    conda-forge\r\npy                        1.8.1                      py_0    conda-forge\r\npy-lief                   0.9.0            py37h0ceac7d_1    conda-forge\r\npycosat                   0.6.3           py37h9bfed18_1004    conda-forge\r\npycparser                 2.20                       py_0    conda-forge\r\npygments                  2.6.1                      py_0    defaults\r\npyopenssl                 19.1.0                     py_1    conda-forge\r\npyparsing                 2.4.7              pyh9f0ad1d_0    conda-forge\r\npysocks                   1.7.1            py37hc8dfbb8_1    conda-forge\r\npython                    3.7.6                h359304d_2    defaults\r\npython-dateutil           2.8.1                      py_0    conda-forge\r\npython-libarchive-c       2.9                      py37_0    conda-forge\r\npython-slugify            4.0.0              pyh9f0ad1d_1    conda-forge\r\npython.app                2                       py37_10    defaults\r\npython_abi                3.7                     1_cp37m    conda-forge\r\npytz                      2020.1             pyh9f0ad1d_0    conda-forge\r\npyyaml                    5.3.1            py37h9bfed18_0    conda-forge\r\nreadline                  7.0               hcfe32e1_1001    conda-forge\r\nreadme_renderer           24.0                     py37_0    defaults\r\nregex                     2020.5.14        py37h9bfed18_0    conda-forge\r\nrequests                  2.23.0             pyh8c360ce_2    conda-forge\r\nrequests-toolbelt         0.9.1                      py_0    defaults\r\nripgrep                   12.1.0               h0b31af3_0    conda-forge\r\nruamel_yaml               0.15.80         py37h9bfed18_1001    conda-forge\r\nsetuptools                46.3.0           py37hc8dfbb8_0    conda-forge\r\nsix                       1.14.0                     py_1    conda-forge\r\nsoupsieve                 1.9.4            py37hc8dfbb8_1    conda-forge\r\nsqlite                    3.31.1               ha441bb4_0    defaults\r\ntext-unidecode            1.3                        py_0    conda-forge\r\ntk                        8.6.10               hbbe82c9_0    conda-forge\r\ntoml                      0.10.0                     py_0    conda-forge\r\ntox                       3.15.0           py37hc8dfbb8_0    conda-forge\r\ntox-conda                 0.2.1                      py_0    conda-forge\r\ntqdm                      4.46.0             pyh9f0ad1d_0    conda-forge\r\ntree                      1.8.0                h0b31af3_1    conda-forge\r\ntwine                     2.0.0                      py_0    defaults\r\ntyped-ast                 1.4.1            py37h0b31af3_0    conda-forge\r\ntyping_extensions         3.7.4.2                    py_0    conda-forge\r\nunidecode                 1.1.1                      py_0    conda-forge\r\nurllib3                   1.25.9                     py_0    conda-forge\r\nvirtualenv                16.7.5                     py_0    conda-forge\r\nwebencodings              0.5.1                    py37_1    defaults\r\nwheel                     0.34.2                     py_1    conda-forge\r\nwhichcraft                0.6.1                      py_0    conda-forge\r\nxz                        5.2.5                h0b31af3_0    conda-forge\r\nyaml                      0.2.4                h0b31af3_0    conda-forge\r\nzipp                      3.1.0                      py_0    conda-forge\r\nzlib                      1.2.11            h0b31af3_1006    conda-forge\r\nzstd                      1.4.4                h4b3e974_3    conda-forge\r\n\r\n```\r\n</p></details>\r\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom logging import getLogger\nfrom os.path import isdir\n\nfrom .common import confirm_yn\nfrom .install import install\nfrom ..base.context import context\nfrom ..common.path import paths_equal\nfrom ..exceptions import CondaValueError\nfrom ..gateways.disk.delete import rm_rf\nfrom ..gateways.disk.test import is_conda_environment\n\nlog = getLogger(__name__)\n\n\ndef execute(args, parser):\n    if is_conda_environment(context.target_prefix):\n        if paths_equal(context.target_prefix, context.root_prefix):\n            raise CondaValueError(\"The target prefix is the base prefix. Aborting.\")\n        confirm_yn(\"WARNING: A conda environment already exists at '%s'\\n\"\n                   \"Remove existing environment\" % context.target_prefix,\n                   default='no',\n                   dry_run=False)\n        log.info(\"Removing existing environment %s\", context.target_prefix)\n        rm_rf(context.target_prefix)\n    elif isdir(context.target_prefix):\n        confirm_yn(\"WARNING: A directory already exists at the target location '%s'\\n\"\n                   \"but it is not a conda environment.\\n\"\n                   \"Continue creating environment\" % context.target_prefix,\n                   default='no',\n                   dry_run=False)\n\n    install(args, parser, 'create')\n", "path": "conda/cli/main_create.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n# Copyright (C) 2012 Anaconda, Inc\n# SPDX-License-Identifier: BSD-3-Clause\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom logging import getLogger\nfrom os.path import isdir\n\nfrom .common import confirm_yn\nfrom .install import install\nfrom ..base.context import context\nfrom ..common.path import paths_equal\nfrom ..exceptions import CondaValueError\nfrom ..gateways.disk.delete import rm_rf\nfrom ..gateways.disk.test import is_conda_environment\n\nlog = getLogger(__name__)\n\n\ndef execute(args, parser):\n    if is_conda_environment(context.target_prefix):\n        if paths_equal(context.target_prefix, context.root_prefix):\n            raise CondaValueError(\"The target prefix is the base prefix. Aborting.\")\n        if context.dry_run:\n            # Taking the \"easy\" way out, rather than trying to fake removing\n            # the existing environment before creating a new one.\n            raise CondaValueError(\"Cannot `create --dry-run` with an existing conda environment\")\n        confirm_yn(\"WARNING: A conda environment already exists at '%s'\\n\"\n                   \"Remove existing environment\" % context.target_prefix,\n                   default='no',\n                   dry_run=False)\n        log.info(\"Removing existing environment %s\", context.target_prefix)\n        rm_rf(context.target_prefix)\n    elif isdir(context.target_prefix):\n        confirm_yn(\"WARNING: A directory already exists at the target location '%s'\\n\"\n                   \"but it is not a conda environment.\\n\"\n                   \"Continue creating environment\" % context.target_prefix,\n                   default='no',\n                   dry_run=False)\n\n    install(args, parser, 'create')\n", "path": "conda/cli/main_create.py"}]}