Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Env.readFile() #496

Merged
merged 6 commits into from
Dec 28, 2021
Merged

Env.readFile() #496

merged 6 commits into from
Dec 28, 2021

Conversation

Jason2605
Copy link
Member

@Jason2605 Jason2605 commented Dec 27, 2021

Well detailed description of the change :

Relies on: #489

This PR does two things (I know, I should have really split it up.)

  • It fixes a bug where importing something from the stdlib that was formed with Dictu code would segfault (UnitTest library for example)
  • Adds Env.readFile() which is a helper method to read and parse env files. By default it'll read .env unless supplied another path. It takes into account # comments for both starting the line and in-line.

Resolves: #473

Type of change:

  • Bug fix

  • New feature

Housekeeping

  • Tests have been updated to reflect the changes done within this PR (if applicable).

  • Documentation has been updated to reflect the changes done within this PR (if applicable).

@Jason2605 Jason2605 added enhancement Implementation of a new feature bug fix Fixes a bug within the codebase labels Dec 27, 2021
@Jason2605 Jason2605 self-assigned this Dec 27, 2021
@Jason2605
Copy link
Member Author

I'd be interested on your thoughts on the readFile implementation @briandowns

See here: https://github.com/dictu-lang/Dictu/blob/90f6f12f0425e77dba7c6513861c22470984a29e/src/optionals/env/env.du

@briandowns
Copy link
Contributor

This looks really clean. I dig it!

@Jason2605 Jason2605 merged commit d3d30fc into develop Dec 28, 2021
@Jason2605 Jason2605 deleted the feature/env_read_file branch December 28, 2021 12:59
@Jason2605 Jason2605 mentioned this pull request Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Fixes a bug within the codebase enhancement Implementation of a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Env.readFile()
2 participants