Skip to content

Commit

Permalink
fix: Resolve symlinks before attempting to find module name from file (
Browse files Browse the repository at this point in the history
…#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.
  • Loading branch information
joao-p-marques authored Jun 29, 2021
1 parent 6de70c7 commit d1bfd6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tasks_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit d1bfd6b

Please sign in to comment.