{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/13200","repository_url":"https://api.github.com/repos/atom/atom","labels_url":"https://api.github.com/repos/atom/atom/issues/13200/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/13200/comments","events_url":"https://api.github.com/repos/atom/atom/issues/13200/events","html_url":"https://github.com/atom/atom/pull/13200","id":188819464,"number":13200,"title":"Make `updateProcessEnv` async and add `core:loaded-shell-environment` activation hook","user":{"login":"as-cii","id":482957,"avatar_url":"https://avatars.githubusercontent.com/u/482957?v=3","gravatar_id":"","url":"https://api.github.com/users/as-cii","html_url":"https://github.com/as-cii","followers_url":"https://api.github.com/users/as-cii/followers","following_url":"https://api.github.com/users/as-cii/following{/other_user}","gists_url":"https://api.github.com/users/as-cii/gists{/gist_id}","starred_url":"https://api.github.com/users/as-cii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/as-cii/subscriptions","organizations_url":"https://api.github.com/users/as-cii/orgs","repos_url":"https://api.github.com/users/as-cii/repos","events_url":"https://api.github.com/users/as-cii/events{/privacy}","received_events_url":"https://api.github.com/users/as-cii/received_events","type":"User","site_admin":true},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-11T18:19:39Z","updated_at":"2016-12-01T21:47:48Z","closed_at":"2016-11-11T18:44:29Z","pull_request":{"url":"https://api.github.com/repos/atom/atom/pulls/13200","html_url":"https://github.com/atom/atom/pull/13200","diff_url":"https://github.com/atom/atom/pull/13200.diff","patch_url":"https://github.com/atom/atom/pull/13200.patch"},"body":"Fixes #9406.\r\nFixes #13084.\r\n\r\nWhen Atom is launched from the Dock, we invoke the user shell to retrieve environment variables that are assigned by their profile settings. However, we were doing so synchronously during startup, thus causing a [major slowdown](https://github.com/atom/atom/issues/9406) when opening Atom from the Dock and sometimes [hanging the startup process indefinitely](https://github.com/atom/atom/issues/13084).\r\n\r\nWith this pull request, we are changing `updateProcessEnv` into an asynchronous method. Packages that require shell environment variables to be assigned prior to activation can use the new `core:loaded-shell-environment` activation hook by putting the following snippet in `package.json`:\r\n\r\n```json\r\n{\"activationHooks\": [\"core:loaded-shell-environment\"]}\r\n```\r\n\r\nThis will defer packages' activation until `process.env` has been updated with the user environment variables.\r\n\r\n/cc: @atom/maintainers "},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/264305701","html_url":"https://github.com/atom/atom/pull/13200#issuecomment-264305701","issue_url":"https://api.github.com/repos/atom/atom/issues/13200","id":264305701,"user":{"login":"ivankravets","id":1760209,"avatar_url":"https://avatars.githubusercontent.com/u/1760209?v=3","gravatar_id":"","url":"https://api.github.com/users/ivankravets","html_url":"https://github.com/ivankravets","followers_url":"https://api.github.com/users/ivankravets/followers","following_url":"https://api.github.com/users/ivankravets/following{/other_user}","gists_url":"https://api.github.com/users/ivankravets/gists{/gist_id}","starred_url":"https://api.github.com/users/ivankravets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivankravets/subscriptions","organizations_url":"https://api.github.com/users/ivankravets/orgs","repos_url":"https://api.github.com/users/ivankravets/repos","events_url":"https://api.github.com/users/ivankravets/events{/privacy}","received_events_url":"https://api.github.com/users/ivankravets/received_events","type":"User","site_admin":false},"created_at":"2016-12-01T21:47:48Z","updated_at":"2016-12-01T21:47:48Z","body":"> Packages that require shell environment variables to be assigned prior to activation can use the new\r\n\r\n@as-cii, Could you call this hook when package has been installed via package manager? I've tried to use this hook for @PlatformIO IDE and new release broke installation process. Users need to manually restart Atom and only after it package will be activated.\r\n\r\nThanks!"}}
{"actor":{"display_login":"ivankravets"}}