Unverified Commit f0383dc8 authored by mvdbeek's avatar mvdbeek
Browse files

Set GALAXY_CONFIG_FILE env var if staring handler with `-c`

parent 01209e17
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -225,6 +225,13 @@ def main(func=app_loop):
    args = arg_parser.parse_args()
    if args.ini_path and not args.config_file:
        args.config_file = args.ini_path
    if (config_file_env := os.environ.get("GALAXY_CONFIG_FILE")) and os.path.abspath(
        config_file_env
    ) != os.path.abspath(args.config_file):
        sys.exit(
            "Error: GALAXY_CONFIG_FILE environment variable is set to a different config file than the one specified on the command line."
        )
    os.environ["GALAXY_CONFIG_FILE"] = os.path.abspath(args.config_file)
    if args.log_file:
        os.environ["GALAXY_CONFIG_LOG_DESTINATION"] = os.path.abspath(args.log_file)
    if args.server_name: