{"action":"created","issue":{"url":"https://api.github.com/repos/bower/config/issues/31","labels_url":"https://api.github.com/repos/bower/config/issues/31/labels{/name}","comments_url":"https://api.github.com/repos/bower/config/issues/31/comments","events_url":"https://api.github.com/repos/bower/config/issues/31/events","html_url":"https://github.com/bower/config/issues/31","id":112159162,"number":31,"title":"Bower breaking node proxy environment if required into a project","user":{"login":"9point6","id":627697,"avatar_url":"https://avatars.githubusercontent.com/u/627697?v=3","gravatar_id":"","url":"https://api.github.com/users/9point6","html_url":"https://github.com/9point6","followers_url":"https://api.github.com/users/9point6/followers","following_url":"https://api.github.com/users/9point6/following{/other_user}","gists_url":"https://api.github.com/users/9point6/gists{/gist_id}","starred_url":"https://api.github.com/users/9point6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/9point6/subscriptions","organizations_url":"https://api.github.com/users/9point6/orgs","repos_url":"https://api.github.com/users/9point6/repos","events_url":"https://api.github.com/users/9point6/events{/privacy}","received_events_url":"https://api.github.com/users/9point6/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"paulohp","id":1068915,"avatar_url":"https://avatars.githubusercontent.com/u/1068915?v=3","gravatar_id":"","url":"https://api.github.com/users/paulohp","html_url":"https://github.com/paulohp","followers_url":"https://api.github.com/users/paulohp/followers","following_url":"https://api.github.com/users/paulohp/following{/other_user}","gists_url":"https://api.github.com/users/paulohp/gists{/gist_id}","starred_url":"https://api.github.com/users/paulohp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulohp/subscriptions","organizations_url":"https://api.github.com/users/paulohp/orgs","repos_url":"https://api.github.com/users/paulohp/repos","events_url":"https://api.github.com/users/paulohp/events{/privacy}","received_events_url":"https://api.github.com/users/paulohp/received_events","type":"User","site_admin":false},"milestone":null,"comments":6,"created_at":"2015-10-19T14:39:29Z","updated_at":"2015-11-27T13:29:00Z","closed_at":null,"body":"A node application I work on requires the `http_proxy` environment variable to function and since updating our bower dependency to the latest version `1.6.3` the variable is set to undefined.\r\n\r\nit appears to be related to the code changed in commit 719ef84, but reversing the change doesn't fix the issue.\r\n\r\nthe issue occurs where the Set method is being called twice so that the original `restoreFrom` object is overwritten with the intermediate environment where the lower-case `http_proxy` variable has been deleted.\r\n\r\nThe following code can demonstrate this issue:\r\n```javascript\r\nconsole.log('Pre-bower env', {\r\n  http_proxy: process.env.http_proxy,\r\n  HTTP_PROXY: process.env.HTTP_PROXY,\r\n  https_proxy: process.env.https_proxy,\r\n  HTTPS_PROXY: process.env.HTTPS_PROXY\r\n});\r\n\r\nvar bower = require('bower');\r\nbower.commands.install()\r\n  .on('end', function() {\r\n    console.log('Post-Bower env', {\r\n      http_proxy: process.env.http_proxy,\r\n      HTTP_PROXY: process.env.HTTP_PROXY,\r\n      https_proxy: process.env.https_proxy,\r\n      HTTPS_PROXY: process.env.HTTPS_PROXY\r\n    });\r\n  });\r\n```\r\n\r\nIt looks like a check to ensure that `restoreFrom` doesn't get overwritten if it already exists would be a simple fix here, but I'm unsure if there is another issue where this shouldn't be called twice in the first place"},"comment":{"url":"https://api.github.com/repos/bower/config/issues/comments/160139927","html_url":"https://github.com/bower/config/issues/31#issuecomment-160139927","issue_url":"https://api.github.com/repos/bower/config/issues/31","id":160139927,"user":{"login":"sheerun","id":292365,"avatar_url":"https://avatars.githubusercontent.com/u/292365?v=3","gravatar_id":"","url":"https://api.github.com/users/sheerun","html_url":"https://github.com/sheerun","followers_url":"https://api.github.com/users/sheerun/followers","following_url":"https://api.github.com/users/sheerun/following{/other_user}","gists_url":"https://api.github.com/users/sheerun/gists{/gist_id}","starred_url":"https://api.github.com/users/sheerun/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sheerun/subscriptions","organizations_url":"https://api.github.com/users/sheerun/orgs","repos_url":"https://api.github.com/users/sheerun/repos","events_url":"https://api.github.com/users/sheerun/events{/privacy}","received_events_url":"https://api.github.com/users/sheerun/received_events","type":"User","site_admin":false},"created_at":"2015-11-27T13:29:00Z","updated_at":"2015-11-27T13:29:00Z","body":"I fixed it in 1.2.3"}}