Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple example does not work on Windows 10 #15

Closed
tbsgt opened this issue Oct 4, 2023 · 0 comments · Fixed by #16
Closed

Simple example does not work on Windows 10 #15

tbsgt opened this issue Oct 4, 2023 · 0 comments · Fixed by #16
Labels
bug Something isn't working

Comments

@tbsgt
Copy link

tbsgt commented Oct 4, 2023

Description

The simple example does not work on Windows.

Reproduce

  1. Make the pyproject.toml from the simple example:
# pyproject.toml
[project.optional-dependencies]
dev = ["doitoml"]

[tool.doit]
loader = "doitoml"
verbosity = 2

[tool.doitoml.tasks.hello]
actions = ['echo "Hello World!"']
  1. Run pip install -e .[dev]

  2. Run doit

  3. See an UnsafePathError:

UnsafePathError: The path is outside the known `safe_paths`: C:/sandboxes/bug-test

  -c:/sandboxes/bug-test

Expected behavior

Run doit and you should see

.  hello:
Hello World!

Context

  • Operating System and version: Windows 10.0.19045
  • doit version(s): 0.36.0
  • doitoml version(s): 0.2.0

Note the capitalization mismatch on the drive letter. If I pass through a traditional dodo.py everything works well.

# dodo.py
from pathlib import Path

from doitoml import DoiTOML


class P:
    """Paths."""
    DODO = Path(__file__)
    ROOT = DODO.parent


doitoml = DoiTOML(
    config_paths=[P.ROOT / "pyproject.toml"]
)
globals().update(doitoml.tasks())
Command Line Output
UnsafePathError: The path is outside the known `safe_paths`: C:/sandboxes/bug-test

-c:/sandboxes/bug-test

@tbsgt tbsgt added the bug Something isn't working label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant