{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/10914","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/10914/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/10914/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/10914/events","html_url":"https://github.com/JuliaLang/julia/pull/10914","id":69660502,"number":10914,"title":"export Base.withenv","user":{"login":"stevengj","id":2913679,"avatar_url":"https://avatars.githubusercontent.com/u/2913679?v=3","gravatar_id":"","url":"https://api.github.com/users/stevengj","html_url":"https://github.com/stevengj","followers_url":"https://api.github.com/users/stevengj/followers","following_url":"https://api.github.com/users/stevengj/following{/other_user}","gists_url":"https://api.github.com/users/stevengj/gists{/gist_id}","starred_url":"https://api.github.com/users/stevengj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevengj/subscriptions","organizations_url":"https://api.github.com/users/stevengj/orgs","repos_url":"https://api.github.com/users/stevengj/repos","events_url":"https://api.github.com/users/stevengj/events{/privacy}","received_events_url":"https://api.github.com/users/stevengj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-20T19:19:03Z","updated_at":"2015-04-20T20:22:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/JuliaLang/julia/pulls/10914","html_url":"https://github.com/JuliaLang/julia/pull/10914","diff_url":"https://github.com/JuliaLang/julia/pull/10914.diff","patch_url":"https://github.com/JuliaLang/julia/pull/10914.patch"},"body":"As dicussed in #10836, this exports `Base.withenv` (renamed from `with_env` for consistency with `setenv`); it now takes zero or more `var=>val` arguments to specify the changes to the environment.\r\n\r\nFor consistency, I added a `setenv` method taking `var=>val` arguments (`Pair...`).  However, the main usage pattern for `setenv` seems to be to `copy(ENV)` and modify/set one environment variable.  Maybe `setenv` should be deprecated entirely in favor of `withenv`?\r\n\r\nNote also that the `setenv` test results weren't actually being checked."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/94558951","html_url":"https://github.com/JuliaLang/julia/pull/10914#issuecomment-94558951","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/10914","id":94558951,"user":{"login":"tkelman","id":5934628,"avatar_url":"https://avatars.githubusercontent.com/u/5934628?v=3","gravatar_id":"","url":"https://api.github.com/users/tkelman","html_url":"https://github.com/tkelman","followers_url":"https://api.github.com/users/tkelman/followers","following_url":"https://api.github.com/users/tkelman/following{/other_user}","gists_url":"https://api.github.com/users/tkelman/gists{/gist_id}","starred_url":"https://api.github.com/users/tkelman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tkelman/subscriptions","organizations_url":"https://api.github.com/users/tkelman/orgs","repos_url":"https://api.github.com/users/tkelman/repos","events_url":"https://api.github.com/users/tkelman/events{/privacy}","received_events_url":"https://api.github.com/users/tkelman/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T20:22:05Z","updated_at":"2015-04-20T20:22:05Z","body":"At the least the way in which `setenv` currently works, returning a modified `Cmd` object from the input `Cmd` object is pretty useful. I think only the DataFrames example above would be able to effectively use this do-block `withenv` construct, maybe unless you were to wrap the entire BinDeps invocation in the do block."}}