{"action":"created","issue":{"url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/255","labels_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/255/comments","events_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/255/events","html_url":"https://github.com/aws/opsworks-cookbooks/issues/255","id":49766411,"number":255,"title":"Deploy Migration `environment` Can Be nil","user":{"login":"noazark","id":477526,"avatar_url":"https://avatars.githubusercontent.com/u/477526?v=3","gravatar_id":"","url":"https://api.github.com/users/noazark","html_url":"https://github.com/noazark","followers_url":"https://api.github.com/users/noazark/followers","following_url":"https://api.github.com/users/noazark/following{/other_user}","gists_url":"https://api.github.com/users/noazark/gists{/gist_id}","starred_url":"https://api.github.com/users/noazark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noazark/subscriptions","organizations_url":"https://api.github.com/users/noazark/orgs","repos_url":"https://api.github.com/users/noazark/repos","events_url":"https://api.github.com/users/noazark/events{/privacy}","received_events_url":"https://api.github.com/users/noazark/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-11-22T01:01:17Z","updated_at":"2015-01-15T22:24:12Z","closed_at":"2015-01-15T16:40:27Z","body":"You'll see [here](https://github.com/aws/opsworks-cookbooks/commit/7c1a659707a5c335b3c25c49ec0217c77796ac2c#diff-a7e8b61380c1485691d1fc718cb6a255R35) that `environment` may be `nil`, I assume that is an OpsWorks thing. So, shouldn't `environment` be tested for `nil` on [line 40](https://github.com/aws/opsworks-cookbooks/commit/7c1a659707a5c335b3c25c49ec0217c77796ac2c#diff-a7e8b61380c1485691d1fc718cb6a255R40) as well?\r\n\r\nShould look like this?\r\n\r\n```rb\r\nif environment && environment.has_key?(\"SHOW_ENVIRONMENT_VARIABLES\")\r\n  Chef::Log.info \"#{@new_resource} migrating #{@new_resource.user} with environment #{env_info}\"\r\nelse\r\n  Chef::Log.info \"#{@new_resource} migrating #{@new_resource.user}\"\r\nend\r\n```"},"comment":{"url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/comments/70174094","html_url":"https://github.com/aws/opsworks-cookbooks/issues/255#issuecomment-70174094","issue_url":"https://api.github.com/repos/aws/opsworks-cookbooks/issues/255","id":70174094,"user":{"login":"pschrammel","id":27882,"avatar_url":"https://avatars.githubusercontent.com/u/27882?v=3","gravatar_id":"","url":"https://api.github.com/users/pschrammel","html_url":"https://github.com/pschrammel","followers_url":"https://api.github.com/users/pschrammel/followers","following_url":"https://api.github.com/users/pschrammel/following{/other_user}","gists_url":"https://api.github.com/users/pschrammel/gists{/gist_id}","starred_url":"https://api.github.com/users/pschrammel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pschrammel/subscriptions","organizations_url":"https://api.github.com/users/pschrammel/orgs","repos_url":"https://api.github.com/users/pschrammel/repos","events_url":"https://api.github.com/users/pschrammel/events{/privacy}","received_events_url":"https://api.github.com/users/pschrammel/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T22:24:12Z","updated_at":"2015-01-15T22:24:12Z","body":"sorry wrong issue..."}}