We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
virtualbuildenv generator does not set LIB env var correctly in activate_build.bat
Running **conan install** with -g virtualbuildenv generates activate_build.bat.
The first four env vars set are:
```
SET PROMPT=...
SET CL=...
SET LIB=...
SET_LINK_=...
```
CL and \_LINK\_ are set correctly, but LIB does not contain my "lib_path".

According to the following code, what happens is LIB added to a dictionary with the correct lib_path, but then the call to "update" to add "vc_vars" overwrites the LIB value with the Visual Studio LIB value.

**virtualbuildenv.py**
```javascript
        if compiler == "Visual Studio":
            self.env = VisualStudioBuildEnvironment(conanfile).vars_dict
            self.env.update(vcvars_dict(conanfile.settings, output=conanfile.output))
        else:
            self.env = AutoToolsBuildEnvironment(conanfile).vars_dict
```
This is incorrect.  The lib_path needs to be merged with the Visual Studio LIB value instead of being replaced.

I'm using conan v1.12.3 on Windows 10 and Visual Studio 2015.




--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `conans/client/generators/virtualbuildenv.py`
Content:
```
1 from conans.client.build.autotools_environment import AutoToolsBuildEnvironment
2 from conans.client.build.visual_environment import VisualStudioBuildEnvironment
3 from conans.client.generators.virtualenv import VirtualEnvGenerator
4 from conans.client.tools.win import vcvars_dict
5 
6 
7 class VirtualBuildEnvGenerator(VirtualEnvGenerator):
8 
9     def __init__(self, conanfile):
10         super(VirtualBuildEnvGenerator, self).__init__(conanfile)
11         self.venv_name = "conanbuildenv"
12         compiler = conanfile.settings.get_safe("compiler")
13         if compiler == "Visual Studio":
14             self.env = VisualStudioBuildEnvironment(conanfile).vars_dict
15             self.env.update(vcvars_dict(conanfile.settings, output=conanfile.output))
16         else:
17             self.env = AutoToolsBuildEnvironment(conanfile).vars_dict
18 
19     @property
20     def content(self):
21         tmp = super(VirtualBuildEnvGenerator, self).content
22         ret = {}
23         for name, value in tmp.items():
24             tmp = name.split(".")
25             ret["%s_build.%s" % (tmp[0], tmp[1])] = value
26 
27         return ret
28
```

Path: `conans/client/generators/virtualenv.py`
Content:
```
1 import os
2 
3 from conans.client.tools.oss import OSInfo
4 from conans.model import Generator
5 
6 
7 class VirtualEnvGenerator(Generator):
8 
9     append_with_spaces = ["CPPFLAGS", "CFLAGS", "CXXFLAGS", "LIBS", "LDFLAGS", "CL"]
10 
11     def __init__(self, conanfile):
12         self.conanfile = conanfile
13         self.env = conanfile.env
14         self.venv_name = "conanenv"
15 
16     @property
17     def filename(self):
18         return
19 
20     def _variable_placeholder(self, flavor, name, append_with_spaces):
21         """
22         :param flavor: flavor of the execution environment
23         :param name: variable name
24         :return: placeholder for the variable name formatted for a certain execution environment.
25         (e.g., cmd, ps1, sh).
26         """
27         if flavor == "cmd":
28             return "%%%s%%" % name
29         if flavor == "ps1":
30             return "$env:%s" % name
31         # flavor == sh
32         return "${%s+ $%s}" % (name, name) if append_with_spaces else "${%s+:$%s}" % (name,  name)
33 
34     def format_values(self, flavor, variables):
35         """
36         Formats the values for the different supported script language flavors.
37         :param flavor: flavor of the execution environment
38         :param variables: variables to be formatted
39         :return:
40         """
41         variables = variables or self.env.items()
42         if flavor == "cmd":
43             path_sep, quote_elements, quote_full_value = ";", False, False
44         elif flavor == "ps1":
45             path_sep, quote_elements, quote_full_value = ";", False, True
46         elif flavor == "sh":
47             path_sep, quote_elements, quote_full_value = ":", True, False
48 
49         ret = []
50         for name, value in variables:
51             # activate values
52             if isinstance(value, list):
53                 append_with_spaces = name in self.append_with_spaces
54                 placeholder = self._variable_placeholder(flavor, name, append_with_spaces)
55                 if append_with_spaces:
56                     # Variables joined with spaces look like: CPPFLAGS="one two three"
57                     value = " ".join(value+[placeholder])
58                     value = "\"%s\"" % value if quote_elements else value
59                 else:
60                     # Quoted variables joined with pathset may look like:
61                     # PATH="one path":"two paths"
62                     # Unquoted variables joined with pathset may look like: PATH=one path;two paths
63                     value = ["\"%s\"" % v for v in value] if quote_elements else value
64                     if flavor == "sh":
65                         value = path_sep.join(value) + placeholder
66                     else:
67                         value = path_sep.join(value + [placeholder])
68             else:
69                 # single value
70                 value = "\"%s\"" % value if quote_elements else value
71             activate_value = "\"%s\"" % value if quote_full_value else value
72 
73             # deactivate values
74             value = os.environ.get(name, "")
75             deactivate_value = "\"%s\"" % value if quote_full_value or quote_elements else value
76             ret.append((name, activate_value, deactivate_value))
77         return ret
78 
79     def _sh_lines(self):
80         variables = [("OLD_PS1", "$PS1"),
81                      ("PS1", "(%s) $PS1" % self.venv_name)]
82         variables.extend(self.env.items())
83 
84         activate_lines = []
85         deactivate_lines = ["%s=%s" % ("PS1", "$OLD_PS1"), "export PS1"]
86 
87         for name, activate, deactivate in self.format_values("sh", variables):
88             activate_lines.append("%s=%s" % (name, activate))
89             activate_lines.append("export %s" % name)
90             if name != "PS1":
91                 if deactivate == '""':
92                     deactivate_lines.append("unset %s" % name)
93                 else:
94                     deactivate_lines.append("%s=%s" % (name, deactivate))
95                     deactivate_lines.append("export %s" % name)
96         activate_lines.append('')
97         deactivate_lines.append('')
98         return activate_lines, deactivate_lines
99 
100     def _cmd_lines(self):
101         variables = [("PROMPT", "(%s) %%PROMPT%%" % self.venv_name)]
102         variables.extend(self.env.items())
103 
104         activate_lines = ["@echo off"]
105         deactivate_lines = ["@echo off"]
106         for name, activate, deactivate in self.format_values("cmd", variables):
107             activate_lines.append("SET %s=%s" % (name, activate))
108             deactivate_lines.append("SET %s=%s" % (name, deactivate))
109         activate_lines.append('')
110         deactivate_lines.append('')
111         return activate_lines, deactivate_lines
112 
113     def _ps1_lines(self):
114         activate_lines = ['function global:_old_conan_prompt {""}']
115         activate_lines.append('$function:_old_conan_prompt = $function:prompt')
116         activate_lines.append('function global:prompt { write-host "(%s) " -nonewline; '
117                               '& $function:_old_conan_prompt }' % self.venv_name)
118         deactivate_lines = ['$function:prompt = $function:_old_conan_prompt']
119         deactivate_lines.append('remove-item function:_old_conan_prompt')
120         for name, activate, deactivate in self.format_values("ps1", self.env.items()):
121             activate_lines.append('$env:%s = %s' % (name, activate))
122             deactivate_lines.append('$env:%s = %s' % (name, deactivate))
123         activate_lines.append('')
124         return activate_lines, deactivate_lines
125 
126     @property
127     def content(self):
128         os_info = OSInfo()
129         result = {}
130         if os_info.is_windows and not os_info.is_posix:
131             activate, deactivate = self._cmd_lines()
132             result["activate.bat"] = os.linesep.join(activate)
133             result["deactivate.bat"] = os.linesep.join(deactivate)
134 
135             activate, deactivate = self._ps1_lines()
136             result["activate.ps1"] = os.linesep.join(activate)
137             result["deactivate.ps1"] = os.linesep.join(deactivate)
138 
139         activate, deactivate = self._sh_lines()
140         result["activate.sh"] = os.linesep.join(activate)
141         result["deactivate.sh"] = os.linesep.join(deactivate)
142 
143         return result
144
```
--- 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/conans/client/generators/virtualbuildenv.py b/conans/client/generators/virtualbuildenv.py
--- a/conans/client/generators/virtualbuildenv.py
+++ b/conans/client/generators/virtualbuildenv.py
@@ -12,7 +12,10 @@
         compiler = conanfile.settings.get_safe("compiler")
         if compiler == "Visual Studio":
             self.env = VisualStudioBuildEnvironment(conanfile).vars_dict
-            self.env.update(vcvars_dict(conanfile.settings, output=conanfile.output))
+            settings_vars = vcvars_dict(conanfile.settings, output=conanfile.output)
+            for env_var in self.env:
+                self.env[env_var].extend(settings_vars.pop(env_var, []))
+            self.env.update(settings_vars)
         else:
             self.env = AutoToolsBuildEnvironment(conanfile).vars_dict
 
diff --git a/conans/client/generators/virtualenv.py b/conans/client/generators/virtualenv.py
--- a/conans/client/generators/virtualenv.py
+++ b/conans/client/generators/virtualenv.py
@@ -6,7 +6,7 @@
 
 class VirtualEnvGenerator(Generator):
 
-    append_with_spaces = ["CPPFLAGS", "CFLAGS", "CXXFLAGS", "LIBS", "LDFLAGS", "CL"]
+    append_with_spaces = ["CPPFLAGS", "CFLAGS", "CXXFLAGS", "LIBS", "LDFLAGS", "CL", "_LINK_"]
 
     def __init__(self, conanfile):
         self.conanfile = conanfile

{"golden_diff": "diff --git a/conans/client/generators/virtualbuildenv.py b/conans/client/generators/virtualbuildenv.py\n--- a/conans/client/generators/virtualbuildenv.py\n+++ b/conans/client/generators/virtualbuildenv.py\n@@ -12,7 +12,10 @@\n         compiler = conanfile.settings.get_safe(\"compiler\")\n         if compiler == \"Visual Studio\":\n             self.env = VisualStudioBuildEnvironment(conanfile).vars_dict\n-            self.env.update(vcvars_dict(conanfile.settings, output=conanfile.output))\n+            settings_vars = vcvars_dict(conanfile.settings, output=conanfile.output)\n+            for env_var in self.env:\n+                self.env[env_var].extend(settings_vars.pop(env_var, []))\n+            self.env.update(settings_vars)\n         else:\n             self.env = AutoToolsBuildEnvironment(conanfile).vars_dict\n \ndiff --git a/conans/client/generators/virtualenv.py b/conans/client/generators/virtualenv.py\n--- a/conans/client/generators/virtualenv.py\n+++ b/conans/client/generators/virtualenv.py\n@@ -6,7 +6,7 @@\n \n class VirtualEnvGenerator(Generator):\n \n-    append_with_spaces = [\"CPPFLAGS\", \"CFLAGS\", \"CXXFLAGS\", \"LIBS\", \"LDFLAGS\", \"CL\"]\n+    append_with_spaces = [\"CPPFLAGS\", \"CFLAGS\", \"CXXFLAGS\", \"LIBS\", \"LDFLAGS\", \"CL\", \"_LINK_\"]\n \n     def __init__(self, conanfile):\n         self.conanfile = conanfile\n", "issue": "virtualbuildenv generator does not set LIB env var correctly in activate_build.bat\nRunning **conan install** with -g virtualbuildenv generates activate_build.bat.\r\nThe first four env vars set are:\r\n```\r\nSET PROMPT=...\r\nSET CL=...\r\nSET LIB=...\r\nSET_LINK_=...\r\n```\r\nCL and \\_LINK\\_ are set correctly, but LIB does not contain my \"lib_path\".\r\n\r\nAccording to the following code, what happens is LIB added to a dictionary with the correct lib_path, but then the call to \"update\" to add \"vc_vars\" overwrites the LIB value with the Visual Studio LIB value.\r\n\r\n**virtualbuildenv.py**\r\n```javascript\r\n        if compiler == \"Visual Studio\":\r\n            self.env = VisualStudioBuildEnvironment(conanfile).vars_dict\r\n            self.env.update(vcvars_dict(conanfile.settings, output=conanfile.output))\r\n        else:\r\n            self.env = AutoToolsBuildEnvironment(conanfile).vars_dict\r\n```\r\nThis is incorrect.  The lib_path needs to be merged with the Visual Studio LIB value instead of being replaced.\r\n\r\nI'm using conan v1.12.3 on Windows 10 and Visual Studio 2015.\r\n\r\n\r\n\n", "before_files": [{"content": "from conans.client.build.autotools_environment import AutoToolsBuildEnvironment\nfrom conans.client.build.visual_environment import VisualStudioBuildEnvironment\nfrom conans.client.generators.virtualenv import VirtualEnvGenerator\nfrom conans.client.tools.win import vcvars_dict\n\n\nclass VirtualBuildEnvGenerator(VirtualEnvGenerator):\n\n    def __init__(self, conanfile):\n        super(VirtualBuildEnvGenerator, self).__init__(conanfile)\n        self.venv_name = \"conanbuildenv\"\n        compiler = conanfile.settings.get_safe(\"compiler\")\n        if compiler == \"Visual Studio\":\n            self.env = VisualStudioBuildEnvironment(conanfile).vars_dict\n            self.env.update(vcvars_dict(conanfile.settings, output=conanfile.output))\n        else:\n            self.env = AutoToolsBuildEnvironment(conanfile).vars_dict\n\n    @property\n    def content(self):\n        tmp = super(VirtualBuildEnvGenerator, self).content\n        ret = {}\n        for name, value in tmp.items():\n            tmp = name.split(\".\")\n            ret[\"%s_build.%s\" % (tmp[0], tmp[1])] = value\n\n        return ret\n", "path": "conans/client/generators/virtualbuildenv.py"}, {"content": "import os\n\nfrom conans.client.tools.oss import OSInfo\nfrom conans.model import Generator\n\n\nclass VirtualEnvGenerator(Generator):\n\n    append_with_spaces = [\"CPPFLAGS\", \"CFLAGS\", \"CXXFLAGS\", \"LIBS\", \"LDFLAGS\", \"CL\"]\n\n    def __init__(self, conanfile):\n        self.conanfile = conanfile\n        self.env = conanfile.env\n        self.venv_name = \"conanenv\"\n\n    @property\n    def filename(self):\n        return\n\n    def _variable_placeholder(self, flavor, name, append_with_spaces):\n        \"\"\"\n        :param flavor: flavor of the execution environment\n        :param name: variable name\n        :return: placeholder for the variable name formatted for a certain execution environment.\n        (e.g., cmd, ps1, sh).\n        \"\"\"\n        if flavor == \"cmd\":\n            return \"%%%s%%\" % name\n        if flavor == \"ps1\":\n            return \"$env:%s\" % name\n        # flavor == sh\n        return \"${%s+ $%s}\" % (name, name) if append_with_spaces else \"${%s+:$%s}\" % (name,  name)\n\n    def format_values(self, flavor, variables):\n        \"\"\"\n        Formats the values for the different supported script language flavors.\n        :param flavor: flavor of the execution environment\n        :param variables: variables to be formatted\n        :return:\n        \"\"\"\n        variables = variables or self.env.items()\n        if flavor == \"cmd\":\n            path_sep, quote_elements, quote_full_value = \";\", False, False\n        elif flavor == \"ps1\":\n            path_sep, quote_elements, quote_full_value = \";\", False, True\n        elif flavor == \"sh\":\n            path_sep, quote_elements, quote_full_value = \":\", True, False\n\n        ret = []\n        for name, value in variables:\n            # activate values\n            if isinstance(value, list):\n                append_with_spaces = name in self.append_with_spaces\n                placeholder = self._variable_placeholder(flavor, name, append_with_spaces)\n                if append_with_spaces:\n                    # Variables joined with spaces look like: CPPFLAGS=\"one two three\"\n                    value = \" \".join(value+[placeholder])\n                    value = \"\\\"%s\\\"\" % value if quote_elements else value\n                else:\n                    # Quoted variables joined with pathset may look like:\n                    # PATH=\"one path\":\"two paths\"\n                    # Unquoted variables joined with pathset may look like: PATH=one path;two paths\n                    value = [\"\\\"%s\\\"\" % v for v in value] if quote_elements else value\n                    if flavor == \"sh\":\n                        value = path_sep.join(value) + placeholder\n                    else:\n                        value = path_sep.join(value + [placeholder])\n            else:\n                # single value\n                value = \"\\\"%s\\\"\" % value if quote_elements else value\n            activate_value = \"\\\"%s\\\"\" % value if quote_full_value else value\n\n            # deactivate values\n            value = os.environ.get(name, \"\")\n            deactivate_value = \"\\\"%s\\\"\" % value if quote_full_value or quote_elements else value\n            ret.append((name, activate_value, deactivate_value))\n        return ret\n\n    def _sh_lines(self):\n        variables = [(\"OLD_PS1\", \"$PS1\"),\n                     (\"PS1\", \"(%s) $PS1\" % self.venv_name)]\n        variables.extend(self.env.items())\n\n        activate_lines = []\n        deactivate_lines = [\"%s=%s\" % (\"PS1\", \"$OLD_PS1\"), \"export PS1\"]\n\n        for name, activate, deactivate in self.format_values(\"sh\", variables):\n            activate_lines.append(\"%s=%s\" % (name, activate))\n            activate_lines.append(\"export %s\" % name)\n            if name != \"PS1\":\n                if deactivate == '\"\"':\n                    deactivate_lines.append(\"unset %s\" % name)\n                else:\n                    deactivate_lines.append(\"%s=%s\" % (name, deactivate))\n                    deactivate_lines.append(\"export %s\" % name)\n        activate_lines.append('')\n        deactivate_lines.append('')\n        return activate_lines, deactivate_lines\n\n    def _cmd_lines(self):\n        variables = [(\"PROMPT\", \"(%s) %%PROMPT%%\" % self.venv_name)]\n        variables.extend(self.env.items())\n\n        activate_lines = [\"@echo off\"]\n        deactivate_lines = [\"@echo off\"]\n        for name, activate, deactivate in self.format_values(\"cmd\", variables):\n            activate_lines.append(\"SET %s=%s\" % (name, activate))\n            deactivate_lines.append(\"SET %s=%s\" % (name, deactivate))\n        activate_lines.append('')\n        deactivate_lines.append('')\n        return activate_lines, deactivate_lines\n\n    def _ps1_lines(self):\n        activate_lines = ['function global:_old_conan_prompt {\"\"}']\n        activate_lines.append('$function:_old_conan_prompt = $function:prompt')\n        activate_lines.append('function global:prompt { write-host \"(%s) \" -nonewline; '\n                              '& $function:_old_conan_prompt }' % self.venv_name)\n        deactivate_lines = ['$function:prompt = $function:_old_conan_prompt']\n        deactivate_lines.append('remove-item function:_old_conan_prompt')\n        for name, activate, deactivate in self.format_values(\"ps1\", self.env.items()):\n            activate_lines.append('$env:%s = %s' % (name, activate))\n            deactivate_lines.append('$env:%s = %s' % (name, deactivate))\n        activate_lines.append('')\n        return activate_lines, deactivate_lines\n\n    @property\n    def content(self):\n        os_info = OSInfo()\n        result = {}\n        if os_info.is_windows and not os_info.is_posix:\n            activate, deactivate = self._cmd_lines()\n            result[\"activate.bat\"] = os.linesep.join(activate)\n            result[\"deactivate.bat\"] = os.linesep.join(deactivate)\n\n            activate, deactivate = self._ps1_lines()\n            result[\"activate.ps1\"] = os.linesep.join(activate)\n            result[\"deactivate.ps1\"] = os.linesep.join(deactivate)\n\n        activate, deactivate = self._sh_lines()\n        result[\"activate.sh\"] = os.linesep.join(activate)\n        result[\"deactivate.sh\"] = os.linesep.join(deactivate)\n\n        return result\n", "path": "conans/client/generators/virtualenv.py"}], "after_files": [{"content": "from conans.client.build.autotools_environment import AutoToolsBuildEnvironment\nfrom conans.client.build.visual_environment import VisualStudioBuildEnvironment\nfrom conans.client.generators.virtualenv import VirtualEnvGenerator\nfrom conans.client.tools.win import vcvars_dict\n\n\nclass VirtualBuildEnvGenerator(VirtualEnvGenerator):\n\n    def __init__(self, conanfile):\n        super(VirtualBuildEnvGenerator, self).__init__(conanfile)\n        self.venv_name = \"conanbuildenv\"\n        compiler = conanfile.settings.get_safe(\"compiler\")\n        if compiler == \"Visual Studio\":\n            self.env = VisualStudioBuildEnvironment(conanfile).vars_dict\n            settings_vars = vcvars_dict(conanfile.settings, output=conanfile.output)\n            for env_var in self.env:\n                self.env[env_var].extend(settings_vars.pop(env_var, []))\n            self.env.update(settings_vars)\n        else:\n            self.env = AutoToolsBuildEnvironment(conanfile).vars_dict\n\n    @property\n    def content(self):\n        tmp = super(VirtualBuildEnvGenerator, self).content\n        ret = {}\n        for name, value in tmp.items():\n            tmp = name.split(\".\")\n            ret[\"%s_build.%s\" % (tmp[0], tmp[1])] = value\n\n        return ret\n", "path": "conans/client/generators/virtualbuildenv.py"}, {"content": "import os\n\nfrom conans.client.tools.oss import OSInfo\nfrom conans.model import Generator\n\n\nclass VirtualEnvGenerator(Generator):\n\n    append_with_spaces = [\"CPPFLAGS\", \"CFLAGS\", \"CXXFLAGS\", \"LIBS\", \"LDFLAGS\", \"CL\", \"_LINK_\"]\n\n    def __init__(self, conanfile):\n        self.conanfile = conanfile\n        self.env = conanfile.env\n        self.venv_name = \"conanenv\"\n\n    @property\n    def filename(self):\n        return\n\n    def _variable_placeholder(self, flavor, name, append_with_spaces):\n        \"\"\"\n        :param flavor: flavor of the execution environment\n        :param name: variable name\n        :return: placeholder for the variable name formatted for a certain execution environment.\n        (e.g., cmd, ps1, sh).\n        \"\"\"\n        if flavor == \"cmd\":\n            return \"%%%s%%\" % name\n        if flavor == \"ps1\":\n            return \"$env:%s\" % name\n        # flavor == sh\n        return \"${%s+ $%s}\" % (name, name) if append_with_spaces else \"${%s+:$%s}\" % (name,  name)\n\n    def format_values(self, flavor, variables):\n        \"\"\"\n        Formats the values for the different supported script language flavors.\n        :param flavor: flavor of the execution environment\n        :param variables: variables to be formatted\n        :return:\n        \"\"\"\n        variables = variables or self.env.items()\n        if flavor == \"cmd\":\n            path_sep, quote_elements, quote_full_value = \";\", False, False\n        elif flavor == \"ps1\":\n            path_sep, quote_elements, quote_full_value = \";\", False, True\n        elif flavor == \"sh\":\n            path_sep, quote_elements, quote_full_value = \":\", True, False\n\n        ret = []\n        for name, value in variables:\n            # activate values\n            if isinstance(value, list):\n                append_with_spaces = name in self.append_with_spaces\n                placeholder = self._variable_placeholder(flavor, name, append_with_spaces)\n                if append_with_spaces:\n                    # Variables joined with spaces look like: CPPFLAGS=\"one two three\"\n                    value = \" \".join(value+[placeholder])\n                    value = \"\\\"%s\\\"\" % value if quote_elements else value\n                else:\n                    # Quoted variables joined with pathset may look like:\n                    # PATH=\"one path\":\"two paths\"\n                    # Unquoted variables joined with pathset may look like: PATH=one path;two paths\n                    value = [\"\\\"%s\\\"\" % v for v in value] if quote_elements else value\n                    if flavor == \"sh\":\n                        value = path_sep.join(value) + placeholder\n                    else:\n                        value = path_sep.join(value + [placeholder])\n            else:\n                # single value\n                value = \"\\\"%s\\\"\" % value if quote_elements else value\n            activate_value = \"\\\"%s\\\"\" % value if quote_full_value else value\n\n            # deactivate values\n            value = os.environ.get(name, \"\")\n            deactivate_value = \"\\\"%s\\\"\" % value if quote_full_value or quote_elements else value\n            ret.append((name, activate_value, deactivate_value))\n        return ret\n\n    def _sh_lines(self):\n        variables = [(\"OLD_PS1\", \"$PS1\"),\n                     (\"PS1\", \"(%s) $PS1\" % self.venv_name)]\n        variables.extend(self.env.items())\n\n        activate_lines = []\n        deactivate_lines = [\"%s=%s\" % (\"PS1\", \"$OLD_PS1\"), \"export PS1\"]\n\n        for name, activate, deactivate in self.format_values(\"sh\", variables):\n            activate_lines.append(\"%s=%s\" % (name, activate))\n            activate_lines.append(\"export %s\" % name)\n            if name != \"PS1\":\n                if deactivate == '\"\"':\n                    deactivate_lines.append(\"unset %s\" % name)\n                else:\n                    deactivate_lines.append(\"%s=%s\" % (name, deactivate))\n                    deactivate_lines.append(\"export %s\" % name)\n        activate_lines.append('')\n        deactivate_lines.append('')\n        return activate_lines, deactivate_lines\n\n    def _cmd_lines(self):\n        variables = [(\"PROMPT\", \"(%s) %%PROMPT%%\" % self.venv_name)]\n        variables.extend(self.env.items())\n\n        activate_lines = [\"@echo off\"]\n        deactivate_lines = [\"@echo off\"]\n        for name, activate, deactivate in self.format_values(\"cmd\", variables):\n            activate_lines.append(\"SET %s=%s\" % (name, activate))\n            deactivate_lines.append(\"SET %s=%s\" % (name, deactivate))\n        activate_lines.append('')\n        deactivate_lines.append('')\n        return activate_lines, deactivate_lines\n\n    def _ps1_lines(self):\n        activate_lines = ['function global:_old_conan_prompt {\"\"}']\n        activate_lines.append('$function:_old_conan_prompt = $function:prompt')\n        activate_lines.append('function global:prompt { write-host \"(%s) \" -nonewline; '\n                              '& $function:_old_conan_prompt }' % self.venv_name)\n        deactivate_lines = ['$function:prompt = $function:_old_conan_prompt']\n        deactivate_lines.append('remove-item function:_old_conan_prompt')\n        for name, activate, deactivate in self.format_values(\"ps1\", self.env.items()):\n            activate_lines.append('$env:%s = %s' % (name, activate))\n            deactivate_lines.append('$env:%s = %s' % (name, deactivate))\n        activate_lines.append('')\n        return activate_lines, deactivate_lines\n\n    @property\n    def content(self):\n        os_info = OSInfo()\n        result = {}\n        if os_info.is_windows and not os_info.is_posix:\n            activate, deactivate = self._cmd_lines()\n            result[\"activate.bat\"] = os.linesep.join(activate)\n            result[\"deactivate.bat\"] = os.linesep.join(deactivate)\n\n            activate, deactivate = self._ps1_lines()\n            result[\"activate.ps1\"] = os.linesep.join(activate)\n            result[\"deactivate.ps1\"] = os.linesep.join(deactivate)\n\n        activate, deactivate = self._sh_lines()\n        result[\"activate.sh\"] = os.linesep.join(activate)\n        result[\"deactivate.sh\"] = os.linesep.join(deactivate)\n\n        return result\n", "path": "conans/client/generators/virtualenv.py"}]}