Skip to content

emscripten has slightly odd default values for some environment variables #2549

@absmall

Description

@absmall

emscripten sets some default values for environment variables:
// Set default values. Use string keys for Closure Compiler compatibility.
ENV['USER'] = 'root';
ENV['PATH'] = '/';
ENV['PWD'] = '/';
ENV['HOME'] = '/home/emscripten';
ENV['LANG'] = 'en_US.UTF-8';
ENV['_'] = './this.program';

The default values for HOME and LANG are not what I would have expected. For LANG, it seems strange to default to English - I happen to speak English, but I would not expect this is a reasonable default for all users of programs compiled with emscripten - would "C" make more sense? It's a bit more neutral. For HOME, this is a directory that is not very likely to exist. Would "/" make more sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions