From 1fe77a786492344b055af6f970248c02e2e5aa8f Mon Sep 17 00:00:00 2001 From: Simon Jagoe Date: Sun, 3 Dec 2023 16:58:12 +0200 Subject: [PATCH] Add logging for relative path check --- haas/plugins/discoverer.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/haas/plugins/discoverer.py b/haas/plugins/discoverer.py index a8d2ab0..bb9a997 100644 --- a/haas/plugins/discoverer.py +++ b/haas/plugins/discoverer.py @@ -42,7 +42,10 @@ def test_error(self): def get_relpath(top_level_directory, fullpath): normalized = os.path.normpath(fullpath) + logger.debug('Determine if %r is within %r', + normalized, top_level_directory) relpath = os.path.relpath(normalized, top_level_directory) + logger.debug('Relative path is %r', relpath) if os.path.isabs(relpath) or relpath.startswith('..'): raise ValueError('Path not within project: {0}'.format(fullpath)) return relpath