Skip to content

Add support for loading environment variables from .env file#208

Merged
JasonShin merged 10 commits intoJasonShin:mainfrom
Leo5878:main
Jun 14, 2025
Merged

Add support for loading environment variables from .env file#208
JasonShin merged 10 commits intoJasonShin:mainfrom
Leo5878:main

Conversation

@Leo5878
Copy link
Contributor

@Leo5878 Leo5878 commented Jun 4, 2025

I faced an issue where environment variables weren't being read correctly, even after exporting them. It was likely caused by some error in my system environment. Although the issue is now resolved, I added support for reading a .env file as a fallback. System environment variables still take precedence

@JasonShin
Copy link
Owner

JasonShin commented Jun 8, 2025

Thanks for this, let me give it a try - this is interesting. I thought env crate would handle this already.

It looks good to me - I will quickly add a test and approve.

Thanks for your contribution!

@JasonShin
Copy link
Owner

JasonShin commented Jun 14, 2025

Thanks for this! - this is now released as v0.22.0
https://github.com/JasonShin/sqlx-ts/releases/tag/v0.22.0

@JasonShin JasonShin merged commit 530ee61 into JasonShin:main Jun 14, 2025
18 checks passed
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.

2 participants