Skip to content

bs refuses to start when any unknown BS_* environment variable is set, without naming it #1061

Closed

Description

@eynhaender

Observed

bs parses every environment variable with the BS_ prefix as a setting. An unknown one makes it exit before doing anything, and the error does not name the variable:

$ BS_FOO=1 bs --version
Error: unrecognised option

$ BS_CLI=x bs --settings
Error: unrecognised option

This applies to every invocation (node start, --settings, --version, store commands). A variable meant for an unrelated tool (here a test script's BS_CLI) is enough to prevent startup, and nothing in the output points to the environment as the cause.

Expected

At minimum, the error names the offending variable and its source, e.g. Error: unrecognised option 'cli' (environment variable BS_CLI). Optionally, unknown BS_* variables are ignored with a warning instead of being fatal.

Environment

bs 4.0.3240 (server 0911d79c), also seen on 4.0.3228; Linux, static release build.

Activity

  1. self-assigned this
    on Oct 14, 2026
  2. evoskuil commented on Oct 14, 2026

    @evoskuil
    Member
    BC_PUSH_WARNING(NO_ARRAY_TO_POINTER_DECAY)
    bool parser::parse(int argc, const char* argv[], std::ostream& error) THROWS
    BC_POP_WARNING()
    {
        try
        {
            auto file = false;
            load_command_variables(argc, argv);
            ////load_environment_variables(environment_prefix);
    ...
  3. evoskuil commented on Oct 14, 2026

    @evoskuil
    Member
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

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