Skip to content

CLI doesn't read environment variables unless it's in .env #771

@ryanprior

Description

@ryanprior

I'm trying to use an environment variable like so:

store Api {
  state endpoint = @ENDPOINT
  [...]
}

When I run the mint dev server, it's saying:

ERROR (ENV_NOT_FOUND_VARIABLE) ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

I cannot find the environment variable with the name:

  ENDPOINT

I've tried running the dev server like so:

$ mint start --env ../.env.dev
# or:
$ ENDPOINT=localhost:3000 mint start

My .env.dev file contains the text ENDPOINT=localhost:3000 followed by a newline)

If I rename the file (cp ../.env.dev .env) then the server does not give me the same error. I suspect the logic to read environment variables from the actual process environment, or from a specified env file, is not working.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions