Use `os.path.expandvars()` on server config argument

This commit is contained in:
Shreya 2021-05-24 15:17:22 +05:30
parent 3098ac1459
commit d33c5d68d8
1 changed files with 1 additions and 1 deletions

View File

@ -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