Skip to content

Conversation

@nsaunders
Copy link
Owner

The main goal of this PR is to avoid resolving unused values.

Consider the following example:

GREETING="Hello, $(whoami)"

Previously, even if the GREETING variable was set (i.e. .env fallback not used), the whoami command would be run in a child process.

After this change, the whoami command will no longer be run if GREETING is already set in the environment.

From this perspective, this PR resolves #38.

In addition, a long-standing issue has been that the return value of loadFile/loadContents is pretty meaningless and not useful. To eliminate any possible confusion, I have changed the return values to Aff Unit, following stackbuilders/dotenv-hs#152.

Therefore, this also resolves #33.

@nsaunders nsaunders force-pushed the selective-resolution branch from 6ea4fc0 to b55cd87 Compare February 12, 2023 20:24
@nsaunders nsaunders merged commit 86e1cd8 into master Feb 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not necessary to resolve unused values Make loadFile output more meaningful.

2 participants