Skip to content

Variables not placed into real environment variables #6

Description

@mikko-tribo

Heya,

thanks for this nifty package, has been pretty helpful so far for easy machine-specific configurations.

One issue I encountered was that this package does not actually place the .env variables into the real environment variable container. This can be problematic in a context where I have some variables I want to set with real env vars on remote machines (through something like docker compose) and locally using .env file, but then I'd have to read the real storage as well as this package's custom storage.

This is the workaround I currently use, but maybe something similar could be in the ParseEnvironmentFile function?

var envDict = env.variables;
foreach (var envVar in envDict)
{
      Environment.SetEnvironmentVariable(envVar.Key, envVar.Value);
}

Activity

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

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