We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Channels in centrally installed .condarc file are being ignored in conda 4.3.4
Hi, I am testing a centrally installed Anaconda setup with Anaconda installed under `C:\Program Files\Anaconda3`. I have a condarc file under `C:\Program Files\Anaconda3\.condarc`.

When I run `conda info` it tells me that my config file is under the correct location.

    config file : C:\Program Files\Anaconda3\.condarc

I have configured a few custom channels in this `.condarc` file, e.g.:

    channels:
      - http://some.internal/url

I can also use `conda config --system --add channels http://some.internal/url` to set this value and conda tells me that channels already contains this value.

But when I run `conda config --system --show`, the list of channels is always set to:

    channels:
      - defaults

It seems that the list of channels in the central `.condarc` file is completely ignored and always replaced by `defaults`. I have also tried to set the list of `default_channels` in the central `.condarc` file but without success.

Using conda 4.3.4 on win-64.


--- 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/__init__.py`
Content:
```
1 # (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io
2 # All Rights Reserved
3 #
4 # conda is distributed under the terms of the BSD 3-clause license.
5 # Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
6 """OS-agnostic, system-level binary package manager."""
7 from __future__ import absolute_import, division, print_function, unicode_literals
8 
9 from os.path import dirname
10 
11 from ._vendor.auxlib.packaging import get_version
12 from .common.compat import iteritems, text_type
13 
14 __all__ = [
15     "__name__", "__version__", "__author__",
16     "__email__", "__license__", "__copyright__",
17     "__summary__", "__url__",
18 ]
19 
20 __name__ = "conda"
21 __version__ = get_version(__file__)
22 __author__ = "Continuum Analytics, Inc."
23 __email__ = "conda@continuum.io"
24 __license__ = "BSD"
25 __summary__ = __doc__
26 __url__ = "https://github.com/conda/conda"
27 
28 CONDA_PACKAGE_ROOT = dirname(__file__)
29 
30 
31 class CondaError(Exception):
32     def __init__(self, message, **kwargs):
33         self.message = message
34         self._kwargs = kwargs
35         super(CondaError, self).__init__(message)
36 
37     def __repr__(self):
38         return '%s: %s\n' % (self.__class__.__name__, text_type(self))
39 
40     def __str__(self):
41         return text_type(self.message % self._kwargs)
42 
43     def dump_map(self):
44         result = dict((k, v) for k, v in iteritems(vars(self)) if not k.startswith('_'))
45         result.update(exception_type=text_type(type(self)),
46                       exception_name=self.__class__.__name__,
47                       message=text_type(self),
48                       error=repr(self),
49                       **self._kwargs)
50         return result
51 
52 
53 class CondaMultiError(CondaError):
54 
55     def __init__(self, errors):
56         self.errors = errors
57         super(CondaError, self).__init__(None)
58 
59     def __repr__(self):
60         return '\n'.join(repr(e) for e in self.errors) + '\n'
61 
62     def __str__(self):
63         return '\n'.join(text_type(e) for e in self.errors) + '\n'
64 
65     def dump_map(self):
66         return dict(exception_type=text_type(type(self)),
67                     exception_name=self.__class__.__name__,
68                     errors=tuple(error.dump_map() for error in self.errors),
69                     error="Multiple Errors Encountered.",
70                     )
71 
72 
73 class CondaExitZero(CondaError):
74     pass
75
```
--- 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/__init__.py b/conda/__init__.py
--- a/conda/__init__.py
+++ b/conda/__init__.py
@@ -6,7 +6,9 @@
 """OS-agnostic, system-level binary package manager."""
 from __future__ import absolute_import, division, print_function, unicode_literals
 
+import os
 from os.path import dirname
+import sys
 
 from ._vendor.auxlib.packaging import get_version
 from .common.compat import iteritems, text_type
@@ -25,6 +27,10 @@
 __summary__ = __doc__
 __url__ = "https://github.com/conda/conda"
 
+
+if os.getenv('CONDA_ROOT') is None:
+    os.environ['CONDA_ROOT'] = sys.prefix
+
 CONDA_PACKAGE_ROOT = dirname(__file__)

{"golden_diff": "diff --git a/conda/__init__.py b/conda/__init__.py\n--- a/conda/__init__.py\n+++ b/conda/__init__.py\n@@ -6,7 +6,9 @@\n \"\"\"OS-agnostic, system-level binary package manager.\"\"\"\n from __future__ import absolute_import, division, print_function, unicode_literals\n \n+import os\n from os.path import dirname\n+import sys\n \n from ._vendor.auxlib.packaging import get_version\n from .common.compat import iteritems, text_type\n@@ -25,6 +27,10 @@\n __summary__ = __doc__\n __url__ = \"https://github.com/conda/conda\"\n \n+\n+if os.getenv('CONDA_ROOT') is None:\n+    os.environ['CONDA_ROOT'] = sys.prefix\n+\n CONDA_PACKAGE_ROOT = dirname(__file__)\n", "issue": "Channels in centrally installed .condarc file are being ignored in conda 4.3.4\nHi, I am testing a centrally installed Anaconda setup with Anaconda installed under `C:\\Program Files\\Anaconda3`. I have a condarc file under `C:\\Program Files\\Anaconda3\\.condarc`.\r\n\r\nWhen I run `conda info` it tells me that my config file is under the correct location.\r\n\r\n    config file : C:\\Program Files\\Anaconda3\\.condarc\r\n\r\nI have configured a few custom channels in this `.condarc` file, e.g.:\r\n\r\n    channels:\r\n      - http://some.internal/url\r\n\r\nI can also use `conda config --system --add channels http://some.internal/url` to set this value and conda tells me that channels already contains this value.\r\n\r\nBut when I run `conda config --system --show`, the list of channels is always set to:\r\n\r\n    channels:\r\n      - defaults\r\n\r\nIt seems that the list of channels in the central `.condarc` file is completely ignored and always replaced by `defaults`. I have also tried to set the list of `default_channels` in the central `.condarc` file but without success.\r\n\r\nUsing conda 4.3.4 on win-64.\r\n\n", "before_files": [{"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nfrom os.path import dirname\n\nfrom ._vendor.auxlib.packaging import get_version\nfrom .common.compat import iteritems, text_type\n\n__all__ = [\n    \"__name__\", \"__version__\", \"__author__\",\n    \"__email__\", \"__license__\", \"__copyright__\",\n    \"__summary__\", \"__url__\",\n]\n\n__name__ = \"conda\"\n__version__ = get_version(__file__)\n__author__ = \"Continuum Analytics, Inc.\"\n__email__ = \"conda@continuum.io\"\n__license__ = \"BSD\"\n__summary__ = __doc__\n__url__ = \"https://github.com/conda/conda\"\n\nCONDA_PACKAGE_ROOT = dirname(__file__)\n\n\nclass CondaError(Exception):\n    def __init__(self, message, **kwargs):\n        self.message = message\n        self._kwargs = kwargs\n        super(CondaError, self).__init__(message)\n\n    def __repr__(self):\n        return '%s: %s\\n' % (self.__class__.__name__, text_type(self))\n\n    def __str__(self):\n        return text_type(self.message % self._kwargs)\n\n    def dump_map(self):\n        result = dict((k, v) for k, v in iteritems(vars(self)) if not k.startswith('_'))\n        result.update(exception_type=text_type(type(self)),\n                      exception_name=self.__class__.__name__,\n                      message=text_type(self),\n                      error=repr(self),\n                      **self._kwargs)\n        return result\n\n\nclass CondaMultiError(CondaError):\n\n    def __init__(self, errors):\n        self.errors = errors\n        super(CondaError, self).__init__(None)\n\n    def __repr__(self):\n        return '\\n'.join(repr(e) for e in self.errors) + '\\n'\n\n    def __str__(self):\n        return '\\n'.join(text_type(e) for e in self.errors) + '\\n'\n\n    def dump_map(self):\n        return dict(exception_type=text_type(type(self)),\n                    exception_name=self.__class__.__name__,\n                    errors=tuple(error.dump_map() for error in self.errors),\n                    error=\"Multiple Errors Encountered.\",\n                    )\n\n\nclass CondaExitZero(CondaError):\n    pass\n", "path": "conda/__init__.py"}], "after_files": [{"content": "# (c) 2012-2016 Continuum Analytics, Inc. / http://continuum.io\n# All Rights Reserved\n#\n# conda is distributed under the terms of the BSD 3-clause license.\n# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.\n\"\"\"OS-agnostic, system-level binary package manager.\"\"\"\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nimport os\nfrom os.path import dirname\nimport sys\n\nfrom ._vendor.auxlib.packaging import get_version\nfrom .common.compat import iteritems, text_type\n\n__all__ = [\n    \"__name__\", \"__version__\", \"__author__\",\n    \"__email__\", \"__license__\", \"__copyright__\",\n    \"__summary__\", \"__url__\",\n]\n\n__name__ = \"conda\"\n__version__ = get_version(__file__)\n__author__ = \"Continuum Analytics, Inc.\"\n__email__ = \"conda@continuum.io\"\n__license__ = \"BSD\"\n__summary__ = __doc__\n__url__ = \"https://github.com/conda/conda\"\n\n\nif os.getenv('CONDA_ROOT') is None:\n    os.environ['CONDA_ROOT'] = sys.prefix\n\nCONDA_PACKAGE_ROOT = dirname(__file__)\n\n\nclass CondaError(Exception):\n    def __init__(self, message, **kwargs):\n        self.message = message\n        self._kwargs = kwargs\n        super(CondaError, self).__init__(message)\n\n    def __repr__(self):\n        return '%s: %s\\n' % (self.__class__.__name__, text_type(self))\n\n    def __str__(self):\n        return text_type(self.message % self._kwargs)\n\n    def dump_map(self):\n        result = dict((k, v) for k, v in iteritems(vars(self)) if not k.startswith('_'))\n        result.update(exception_type=text_type(type(self)),\n                      exception_name=self.__class__.__name__,\n                      message=text_type(self),\n                      error=repr(self),\n                      **self._kwargs)\n        return result\n\n\nclass CondaMultiError(CondaError):\n\n    def __init__(self, errors):\n        self.errors = errors\n        super(CondaError, self).__init__(None)\n\n    def __repr__(self):\n        return '\\n'.join(repr(e) for e in self.errors) + '\\n'\n\n    def __str__(self):\n        return '\\n'.join(text_type(e) for e in self.errors) + '\\n'\n\n    def dump_map(self):\n        return dict(exception_type=text_type(type(self)),\n                    exception_name=self.__class__.__name__,\n                    errors=tuple(error.dump_map() for error in self.errors),\n                    error=\"Multiple Errors Encountered.\",\n                    )\n\n\nclass CondaExitZero(CondaError):\n    pass\n", "path": "conda/__init__.py"}]}