{"action":"created","issue":{"url":"https://api.github.com/repos/kripken/emscripten/issues/3915","labels_url":"https://api.github.com/repos/kripken/emscripten/issues/3915/labels{/name}","comments_url":"https://api.github.com/repos/kripken/emscripten/issues/3915/comments","events_url":"https://api.github.com/repos/kripken/emscripten/issues/3915/events","html_url":"https://github.com/kripken/emscripten/issues/3915","id":116993026,"number":3915,"title":"getenv does not get environment var","user":{"login":"claudiodaffra","id":4798613,"avatar_url":"https://avatars.githubusercontent.com/u/4798613?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiodaffra","html_url":"https://github.com/claudiodaffra","followers_url":"https://api.github.com/users/claudiodaffra/followers","following_url":"https://api.github.com/users/claudiodaffra/following{/other_user}","gists_url":"https://api.github.com/users/claudiodaffra/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiodaffra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiodaffra/subscriptions","organizations_url":"https://api.github.com/users/claudiodaffra/orgs","repos_url":"https://api.github.com/users/claudiodaffra/repos","events_url":"https://api.github.com/users/claudiodaffra/events{/privacy}","received_events_url":"https://api.github.com/users/claudiodaffra/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-15T13:34:25Z","updated_at":"2015-11-16T11:37:14Z","closed_at":null,"body":"getenv does not get Environment var (emscripten 1.35.0 )\r\n \r\nExcpet PATH that return '/' wrong path\r\nthe other environment var are NULL\r\n\r\n\t#include <stdio.h>       \r\n\t#include <stdlib.h>      \r\n\r\n\tint main ()\r\n\t{\r\n\tchar* ENVAR;\r\n\r\n\t\tENVAR = getenv (\"PATH\");\t\tif (ENVAR!=NULL)\tprintf (\"\\n <%s>\",ENVAR);\t\r\n\t\tENVAR = getenv (\"TEMP\");\t\tif (ENVAR!=NULL)\tprintf (\"\\n <%s>\",ENVAR);\t\r\n\t\tENVAR = getenv (\"EMSCRIPTEN\");\tif (ENVAR!=NULL)\tprintf (\"\\n <%s>\",ENVAR);\t\r\n\t\tENVAR = getenv (\"ComSpec\");\t\tif (ENVAR!=NULL)\tprintf (\"\\n <%s>\",ENVAR);\t\r\n\r\n\t  return 0;\r\n\t}\r\n "},"comment":{"url":"https://api.github.com/repos/kripken/emscripten/issues/comments/157004081","html_url":"https://github.com/kripken/emscripten/issues/3915#issuecomment-157004081","issue_url":"https://api.github.com/repos/kripken/emscripten/issues/3915","id":157004081,"user":{"login":"claudiodaffra","id":4798613,"avatar_url":"https://avatars.githubusercontent.com/u/4798613?v=3","gravatar_id":"","url":"https://api.github.com/users/claudiodaffra","html_url":"https://github.com/claudiodaffra","followers_url":"https://api.github.com/users/claudiodaffra/followers","following_url":"https://api.github.com/users/claudiodaffra/following{/other_user}","gists_url":"https://api.github.com/users/claudiodaffra/gists{/gist_id}","starred_url":"https://api.github.com/users/claudiodaffra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/claudiodaffra/subscriptions","organizations_url":"https://api.github.com/users/claudiodaffra/orgs","repos_url":"https://api.github.com/users/claudiodaffra/repos","events_url":"https://api.github.com/users/claudiodaffra/events{/privacy}","received_events_url":"https://api.github.com/users/claudiodaffra/received_events","type":"User","site_admin":false},"created_at":"2015-11-16T11:37:14Z","updated_at":"2015-11-16T11:37:14Z","body":"yes in node is easy to get ENV VAR, i write my workaround ...\r\n\r\n\tEM_ASM ( \"console.log('Current directory: ' + process.cwd());\" );\r\n\t\r\nthank you, kripken for your work about emscripten\r\n"}}