{"action":"created","issue":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/38818","labels_url":"https://api.github.com/repos/Homebrew/homebrew/issues/38818/labels{/name}","comments_url":"https://api.github.com/repos/Homebrew/homebrew/issues/38818/comments","events_url":"https://api.github.com/repos/Homebrew/homebrew/issues/38818/events","html_url":"https://github.com/Homebrew/homebrew/issues/38818","id":69410410,"number":38818,"title":"Shall we run `brew update` automatically?","user":{"login":"mikemcquaid","id":125011,"avatar_url":"https://avatars.githubusercontent.com/u/125011?v=3","gravatar_id":"","url":"https://api.github.com/users/mikemcquaid","html_url":"https://github.com/mikemcquaid","followers_url":"https://api.github.com/users/mikemcquaid/followers","following_url":"https://api.github.com/users/mikemcquaid/following{/other_user}","gists_url":"https://api.github.com/users/mikemcquaid/gists{/gist_id}","starred_url":"https://api.github.com/users/mikemcquaid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikemcquaid/subscriptions","organizations_url":"https://api.github.com/users/mikemcquaid/orgs","repos_url":"https://api.github.com/users/mikemcquaid/repos","events_url":"https://api.github.com/users/mikemcquaid/events{/privacy}","received_events_url":"https://api.github.com/users/mikemcquaid/received_events","type":"User","site_admin":true},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-04-19T10:35:39Z","updated_at":"2015-04-20T17:34:22Z","closed_at":null,"body":"This would fix a lot of issues people have. Obviously we'd need to catch/handle the \"no internet connection\" case but otherwise it seems sensible to me."},"comment":{"url":"https://api.github.com/repos/Homebrew/homebrew/issues/comments/94517855","html_url":"https://github.com/Homebrew/homebrew/issues/38818#issuecomment-94517855","issue_url":"https://api.github.com/repos/Homebrew/homebrew/issues/38818","id":94517855,"user":{"login":"chdiza","id":3311113,"avatar_url":"https://avatars.githubusercontent.com/u/3311113?v=3","gravatar_id":"","url":"https://api.github.com/users/chdiza","html_url":"https://github.com/chdiza","followers_url":"https://api.github.com/users/chdiza/followers","following_url":"https://api.github.com/users/chdiza/following{/other_user}","gists_url":"https://api.github.com/users/chdiza/gists{/gist_id}","starred_url":"https://api.github.com/users/chdiza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chdiza/subscriptions","organizations_url":"https://api.github.com/users/chdiza/orgs","repos_url":"https://api.github.com/users/chdiza/repos","events_url":"https://api.github.com/users/chdiza/events{/privacy}","received_events_url":"https://api.github.com/users/chdiza/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T17:34:22Z","updated_at":"2015-04-20T17:34:22Z","body":">  I'd see this as checking if the internet connection is up before doing anything (probably seeing if a single ping to github.com responds within a second).\r\n\r\nOne could also, before that, test that wifi is even ON.  Using, perhaps `networksetup -getairportpower -en1`, or by querying (and grepping) `/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport`, or some better method.\r\n\r\nThis will save the one second waiting for a ping."}}