Skip to content

No substitution when a var is assigned to itself #86

@huntc

Description

@huntc

Variable expansion of an externally declared variable does not appear to occur when assigned back to the same variable name e.g. given the declaration of GITHUB_TOKEN, in my .env file:

GITHUB_TOKEN="$GITHUB_TOKEN"

...then show envFromFile from within the sbt session reveals:

[info] 	Map(GITHUB_TOKEN -> $GITHUB_TOKEN)

i.e. the token is not substituted where GITHUB_TOKEN has been declared prior to invoking sbt.

I'm not certain, but I think the following line is causing a problem:

      VariableExpansion.expandAllVars(sys.env ++ environment, environment)

i.e. the fact that environment is appended to sys.env.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions