Fix a bug where the config file wasn't actually read on linux/mac

This commit is contained in:
cmdr2 2024-10-02 15:30:29 +05:30
parent 391e12e20d
commit 6ea7dd36da
3 changed files with 3 additions and 1 deletions

View File

@ -298,7 +298,7 @@ Thanks!"""
def get_config():
config_directory = os.path.dirname(__file__) # this will be "scripts"
config_yaml = os.path.join(config_directory, "..", "config.yaml")
config_yaml = os.path.abspath(os.path.join(config_directory, "..", "config.yaml"))
config_json = os.path.join(config_directory, "config.json")
config = None

View File

@ -6,6 +6,7 @@ import shutil
# The config file is in the same directory as this script
config_directory = os.path.dirname(__file__)
config_yaml = os.path.join(config_directory, "..", "config.yaml")
config_yaml = os.path.abspath(config_yaml)
config_json = os.path.join(config_directory, "config.json")
parser = argparse.ArgumentParser(description='Get values from config file')

View File

@ -119,6 +119,7 @@ def init_render_threads():
def getConfig(default_val=APP_CONFIG_DEFAULTS):
config_yaml_path = os.path.join(CONFIG_DIR, "..", "config.yaml")
config_yaml_path = os.path.abspath(config_yaml_path)
# migrate the old config yaml location
config_legacy_yaml = os.path.join(CONFIG_DIR, "config.yaml")