Skip to content

Commit

Permalink
try it this way then?
Browse files Browse the repository at this point in the history
  • Loading branch information
QuintenQVD0 committed Feb 9, 2024
1 parent f5ef5fc commit b175dae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -257,13 +257,13 @@ func main() {
// Update values based on environment variables
for key, value := range envVars {
// Check if the environment variable exists
if value == "" && os.Getenv(key) == "" {
if value == "" && os.Getenv(key) == "" && os.Getenv(key) != "nil"{
//fmt.Printf("Skipping key: %s because environment variable doesn't exist\n", key)
continue
}

// Skip validation and updating if value is empty but environment variable exists
if value == "" && os.Getenv(key) != "" {
if value == "" && (os.Getenv(key) != "" || os.Getenv(key) == "nil") {
fmt.Printf("Skipping key: %s because value is empty\n", key)
// Set key to empty value in the INI file
setINIValue(&iniContent, key, "", envVarsQuotes[key])

0 comments on commit b175dae

Please sign in to comment.