Skip to content

Direct environment access on node.js #3915

@ghost

Description

getenv does not get Environment var (emscripten 1.35.0 )

Excpet PATH that return '/' wrong path
the other environment var are NULL

#include <stdio.h>       
#include <stdlib.h>      

int main ()
{
char* ENVAR;

    ENVAR = getenv ("PATH");        if (ENVAR!=NULL)    printf ("\n <%s>",ENVAR);   
    ENVAR = getenv ("TEMP");        if (ENVAR!=NULL)    printf ("\n <%s>",ENVAR);   
    ENVAR = getenv ("EMSCRIPTEN");  if (ENVAR!=NULL)    printf ("\n <%s>",ENVAR);   
    ENVAR = getenv ("ComSpec");     if (ENVAR!=NULL)    printf ("\n <%s>",ENVAR);   

  return 0;
}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions