Skip to content

Handle non relative paths #37

@s0undt3ch

Description

@s0undt3ch
Traceback (most recent call last):
  File "/usr/local/bin/tools", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/dist-packages/ptscripts/__main__.py", line 41, in main
    parser.parse_args()
  File "/usr/local/lib/python3.9/dist-packages/ptscripts/parser.py", line 480, in parse_args
    self._process_registered_tool_modules()
  File "/usr/local/lib/python3.9/dist-packages/ptscripts/parser.py", line 457, in _process_registered_tool_modules
    with default_venv:
  File "/usr/local/lib/python3.9/dist-packages/ptscripts/virtualenv.py", line 227, in __enter__
    self._create_virtualenv()
  File "/usr/local/lib/python3.9/dist-packages/ptscripts/virtualenv.py", line 179, in _create_virtualenv
    self.ctx.info(f"Creating virtualenv({self.name}) in {self.venv_dir.relative_to(CWD)}")
  File "/usr/lib/python3.9/pathlib.py", line 928, in relative_to
    raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: '/github/home/.tools-venvs/default' is not in the subpath of '/__w/salt/salt/pkgs/checkout' OR one path is relative and the other is absolute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions