You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a usecase where we let user give their environment variables which we write to a env file using this package, that file will be sent to docker as an env file. While seeing the logs, I observe that I'm getting double quotes over values of env variables due to which the script which I mounted on my docker I've to assume that double quotes have been added to the values of env variables there as well . On debugging through this package, saw this line
for k, v := range envMap {
if d, err := strconv.Atoi(v); err == nil {
lines = append(lines, fmt.Sprintf(`%s=%d`, k, d))
} else {
lines = append(lines, fmt.Sprintf(`%s="%s"`, k, doubleQuoteEscape(v)))
}
}
Where we're adding double quotes over the values in map while appending to the file. Not sure if it's a bug or is being done in this way for some purpose. As of now I move to a different package but want to move back to this package only. Can you please help me with this?
The text was updated successfully, but these errors were encountered:
HimanshuJha2000
changed the title
Double quotes in values .env
Getting double quotes in values in env file
Jun 6, 2023
We have a usecase where we let user give their environment variables which we write to a env file using this package, that file will be sent to docker as an env file. While seeing the logs, I observe that I'm getting double quotes over values of env variables due to which the script which I mounted on my docker I've to assume that double quotes have been added to the values of env variables there as well . On debugging through this package, saw this line
Where we're adding double quotes over the values in map while appending to the file. Not sure if it's a bug or is being done in this way for some purpose. As of now I move to a different package but want to move back to this package only. Can you please help me with this?
The text was updated successfully, but these errors were encountered: