-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
The title is almost self-explanatory.
Line 587 in 58659f2
| key := envTokens[0] |
Line 588 in 58659f2
| val := envTokens[1] |
Why is this a problem?
I have a configuration “compositor” that formats the file referenced by MINIO_CONFIG_ENV_FILE, aligning all the = symbols in the same column. This adds spaces before and after the = symbol in the file.
This isn’t a problem when running MinIO as a systemd service — with the EnvironmentFile= directive, the file is parsed correctly and the environment variables are passed properly to MinIO.
However, I had a hard time figuring out why minio admin service restart wasn’t picking up the updated values. Now I found the cause.
Is this intentional, or just a slight oversight?
In my opinion, even beyond my specific setup, an extra space can easily slip into a configuration file. Since the parser doesn’t trim spaces, the environment key ends up containing the space, making it unrecognized — with no error or clue about what went wrong.