Environment-based configuration files not being loaded correctly #1

Closed
opened 2023-07-12 02:22:29 +00:00 by netkas · 4 comments
netkas commented 2023-07-12 02:22:29 +00:00 (Migrated from git-old.n64.cc)

Configuration library is not correctly handling the environment variables, which leads to incorrect file paths being used when loading configuration files. This resulted in warnings being issued that configuration files did not exist, even when the correct paths were provided via environment variables.

Configuration library is not correctly handling the environment variables, which leads to incorrect file paths being used when loading configuration files. This resulted in warnings being issued that configuration files did not exist, even when the correct paths were provided via environment variables.
netkas commented 2023-07-12 02:22:30 +00:00 (Migrated from git-old.n64.cc)

assigned to @netkas

assigned to @netkas
netkas commented 2023-07-12 02:23:48 +00:00 (Migrated from git-old.n64.cc)

The Configuration->__construct() method was sanitizing the name of the configuration to be used and fetching the corresponding environment variable correctly. However, it was then using the name of the environment variable, rather than its value, when checking if the configuration file existed and when setting the path to the configuration file.

The bug has been fixed by using the value of the environment variable, rather than its name, when checking if the configuration file exists and when setting the path to the configuration file. The affected lines of code are within the Configuration->__construct() method.

The `Configuration->__construct()` method was sanitizing the name of the configuration to be used and fetching the corresponding environment variable correctly. However, it was then using the name of the environment variable, rather than its value, when checking if the configuration file existed and when setting the path to the configuration file. The bug has been fixed by using the value of the environment variable, rather than its name, when checking if the configuration file exists and when setting the path to the configuration file. The affected lines of code are within the `Configuration->__construct()` method.
netkas commented 2023-07-12 02:26:00 +00:00 (Migrated from git-old.n64.cc)

mentioned in commit a3c04e1c36

mentioned in commit a3c04e1c3623d9441d0478aa43a2ca1801107669
netkas (Migrated from git-old.n64.cc) closed this issue 2023-07-12 02:26:34 +00:00
netkas commented 2023-07-13 21:05:42 +00:00 (Migrated from git-old.n64.cc)

mentioned in commit 5afae885db

mentioned in commit 5afae885db983b5bc910e6101f86ab9d64f88dc0
Sign in to join this conversation.
No description provided.