From d33c5d68d861640f63fcef01defeab3bd24ab3d3 Mon Sep 17 00:00:00 2001 From: Shreya Date: Mon, 24 May 2021 15:17:22 +0530 Subject: [PATCH] Use `os.path.expandvars()` on server config argument --- monkey/monkey_island/setup/config_setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monkey/monkey_island/setup/config_setup.py b/monkey/monkey_island/setup/config_setup.py index 9980c66cd..05f410fa8 100644 --- a/monkey/monkey_island/setup/config_setup.py +++ b/monkey/monkey_island/setup/config_setup.py @@ -7,7 +7,7 @@ from monkey_island.cc.server_utils.consts import DEFAULT_DATA_DIR, DEFAULT_SERVE def setup_config_by_cmd_arg(server_config_path) -> Tuple[dict, str]: - server_config_path = os.path.expanduser(server_config_path) + server_config_path = os.path.expandvars(os.path.expanduser(server_config_path)) config = server_config_handler.load_server_config_from_file(server_config_path) create_data_dir(config["data_dir"], create_parent_dirs=True) return config, server_config_path