From d1bfd6b62e55edd4998f9b5f0e8eecf42ee10358 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Marques?= Date: Tue, 29 Jun 2021 07:32:01 +0100 Subject: [PATCH] fix: Resolve symlinks before attempting to find module name from file (#263) The file name that is passed to the function might be a symlink. Example: In Fedora SilverBlue, `/home/` is a symlink to `/var/home`. If you have a home folder (along with VSCode settings) that comes from a backed up system where home is `/home`, VSCode will pass the file name with `/home` as root, not `/var/home`, causing this script to fail. This avoids that. --- tasks_downstream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks_downstream.py b/tasks_downstream.py index c22559bc..ddc87a48 100644 --- a/tasks_downstream.py +++ b/tasks_downstream.py @@ -60,7 +60,7 @@ def _remove_auto_reload(file, orig_file): def _get_cwd_addon(file): - cwd = Path(file) + cwd = Path(file).resolve() manifest_file = False while PROJECT_ROOT < cwd: manifest_file = (cwd / "__manifest__.py").exists() or (