Skip to content

Commit 48bd37b

Browse files
committed
Fix docker desktop resource cache config
1 parent 8fe4f49 commit 48bd37b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

exegol/config/EnvInfo.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,19 @@ def getDockerDesktopSettings(cls) -> Dict:
224224
except FileNotFoundError:
225225
logger.warning(f"Docker Desktop configuration file not found: '{file_path}'")
226226
return {}
227-
if cls.__docker_desktop_resource_config is None:
228-
logger.warning(f"Docker Desktop configuration couldn't be loaded from '{file_path}'")
227+
if cls.__docker_desktop_resource_config is None:
228+
logger.warning(f"Docker Desktop configuration couldn't be loaded.'")
229+
else:
229230
return cls.__docker_desktop_resource_config
230231
return {}
231232

232233
@classmethod
233234
def getDockerDesktopResources(cls) -> List[str]:
234235
settings = cls.getDockerDesktopSettings()
235236
# Handle legacy settings key
236-
return settings.get('FilesharingDirectories', settings.get('filesharingDirectories', []))
237+
docker_desktop_resources = settings.get('FilesharingDirectories', settings.get('filesharingDirectories', []))
238+
logger.debug(f"Docker Desktop resources whitelist: {docker_desktop_resources}")
239+
return docker_desktop_resources
237240

238241
@classmethod
239242
def isHostNetworkAvailable(cls) -> bool:

0 commit comments

Comments
 (0)