From c6a137a38c33f3c94d55d39da1708e76ad69b93b Mon Sep 17 00:00:00 2001 From: Diego Ferigo Date: Tue, 16 Jun 2020 15:07:12 +0200 Subject: [PATCH] Create dot folder in user's home if missing --- python/gym_ignition/utils/setup_environment.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/gym_ignition/utils/setup_environment.py b/python/gym_ignition/utils/setup_environment.py index a96e5b88e..0e582dcb8 100644 --- a/python/gym_ignition/utils/setup_environment.py +++ b/python/gym_ignition/utils/setup_environment.py @@ -4,6 +4,7 @@ import os import gym.logger +from pathlib import Path from gym_ignition.utils import logger @@ -13,6 +14,11 @@ def setup_environment() -> None: (User or Developer). """ + # Make sure that the dot folder in the user's home exists + Path("~/.ignition/gazebo").expanduser().mkdir(mode=0o755, + parents=True, + exist_ok=True) + # Configure the environment ign_gazebo_system_plugin_path = ""