{"action":"created","issue":{"url":"https://api.github.com/repos/heroku/heroku/issues/1493","labels_url":"https://api.github.com/repos/heroku/heroku/issues/1493/labels{/name}","comments_url":"https://api.github.com/repos/heroku/heroku/issues/1493/comments","events_url":"https://api.github.com/repos/heroku/heroku/issues/1493/events","html_url":"https://github.com/heroku/heroku/issues/1493","id":67261018,"number":1493,"title":"Environment variables with spaces at the front are ignored","user":{"login":"adamcohen","id":279925,"avatar_url":"https://avatars.githubusercontent.com/u/279925?v=3","gravatar_id":"","url":"https://api.github.com/users/adamcohen","html_url":"https://github.com/adamcohen","followers_url":"https://api.github.com/users/adamcohen/followers","following_url":"https://api.github.com/users/adamcohen/following{/other_user}","gists_url":"https://api.github.com/users/adamcohen/gists{/gist_id}","starred_url":"https://api.github.com/users/adamcohen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamcohen/subscriptions","organizations_url":"https://api.github.com/users/adamcohen/orgs","repos_url":"https://api.github.com/users/adamcohen/repos","events_url":"https://api.github.com/users/adamcohen/events{/privacy}","received_events_url":"https://api.github.com/users/adamcohen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-09T02:02:16Z","updated_at":"2015-11-03T22:46:37Z","closed_at":null,"body":"I mistakenly copied and pasted an ENV variable with a space at the front into the \"Config Vars\" area of the heroku dashboard web UI.  This variable didn't show up in my Node.js app, and after some investigating, it seems that heroku removes variables from the environment if they have a space at the front.  If ENV variables with a space at the front are effectively ignored, there should either be a warning from the web ui and command line interface when attempting to set such a variable, or spaces at the beginning of a variable should be stripped automatically.\r\n\r\nHere's how to reproduce it from the command line:\r\n\r\n```\r\n% heroku config:set ' SOME_VAR_WITH_A_SPACE_AT_THE_FRONT=some value'\r\n% heroku config\r\n\r\n=== my app Config Vars\r\n SOME_VAR_WITH_A_SPACE_AT_THE_FRONT:             some value\r\nANOTHER_VAR_WITHOUT_A_SPACE:                     whatever\r\n\r\n% heroku run bash\r\n\r\n~ $ env\r\n\r\nTERM=xterm-256color\r\nWEB_MEMORY=512\r\nANOTHER_VAR_WITHOUT_A_SPACE=whatever\r\n... more variables, not including the one with a space at the front\r\n```"},"comment":{"url":"https://api.github.com/repos/heroku/heroku/issues/comments/153513193","html_url":"https://github.com/heroku/heroku/issues/1493#issuecomment-153513193","issue_url":"https://api.github.com/repos/heroku/heroku/issues/1493","id":153513193,"user":{"login":"jpaas","id":1231716,"avatar_url":"https://avatars.githubusercontent.com/u/1231716?v=3","gravatar_id":"","url":"https://api.github.com/users/jpaas","html_url":"https://github.com/jpaas","followers_url":"https://api.github.com/users/jpaas/followers","following_url":"https://api.github.com/users/jpaas/following{/other_user}","gists_url":"https://api.github.com/users/jpaas/gists{/gist_id}","starred_url":"https://api.github.com/users/jpaas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jpaas/subscriptions","organizations_url":"https://api.github.com/users/jpaas/orgs","repos_url":"https://api.github.com/users/jpaas/repos","events_url":"https://api.github.com/users/jpaas/events{/privacy}","received_events_url":"https://api.github.com/users/jpaas/received_events","type":"User","site_admin":false},"created_at":"2015-11-03T22:46:37Z","updated_at":"2015-11-03T22:46:37Z","body":"Actually you don't even need single quotes and the spaces can occur after also. e.g. \r\n```\r\nheroku config:set  SPACE_BEFORE=pooched\r\nheroku config:set SPACE_AFTER =boned\r\n```\r\n"}}