fix: centralize environment loading to avoid duplicate .env processing#31
Open
itsjetlag wants to merge 1 commit intoLayer-Edge:mainfrom
Open
fix: centralize environment loading to avoid duplicate .env processing#31itsjetlag wants to merge 1 commit intoLayer-Edge:mainfrom
itsjetlag wants to merge 1 commit intoLayer-Edge:mainfrom
Conversation
This commit fixes the environment loading mechanism by: - Removing duplicate .env loading in utils/get_env.go - Centralizing all environment loading in main.go - Adding better error handling with more descriptive messages - Making .env loading non-fatal to support fallback to default values - Improving debugging by displaying the working directory The previous implementation attempted to load the .env file in multiple places, leading to confusing error messages and potential inconsistencies. This change makes the environment loading process more robust and easier to debug when issues occur.
|
I tried the soltuion you gave. But having error loading . env file |
Author
|
what error did you get? it's working fine on my side @quotexx |
Author
|
have you created the .env file? @quotexx |
|
Yeah, created it. I also tried deleting the . env file of go then proceed same problem. I tried everything but syill it happens |
|
@quotexx erase the initial 0x from your private key, it should work |
|
Also did it same |
eday19
approved these changes
Mar 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This commit fixes the environment loading mechanism by:
The previous implementation attempted to load the .env file in multiple places, leading to confusing error messages and potential inconsistencies. This change makes the environment loading process more robust and easier to debug when issues occur.