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

too errors if not in subdirectory of HOME #5

Open
mahiki opened this issue Jul 21, 2022 · 0 comments
Open

too errors if not in subdirectory of HOME #5

mahiki opened this issue Jul 21, 2022 · 0 comments

Comments

@mahiki
Copy link
Owner

mahiki commented Jul 21, 2022

Test the input path and exit with an error message if the cwd is not subdir of HOME.

too big
Traceback (most recent call last):
  File "/opt/homebrew/bin/too", line 8, in <module>
    sys.exit(main())
  File "/opt/homebrew/Cellar/desertislandutils/0.1.0/libexec/lib/python3.9/site-packages/src/toobigdatadoc/too.py", line 85, in main
    make_topdir_and_link(too_rel_path(Path.cwd()))
  File "/opt/homebrew/Cellar/desertislandutils/0.1.0/libexec/lib/python3.9/site-packages/src/toobigdatadoc/too.py", line 77, in too_rel_path
    path_from_home = any_path.relative_to(Path.home())
  File "/opt/homebrew/Cellar/[email protected]/3.9.10/Frameworks/Python.framework/Versions/3.9/lib/python3.9/pathlib.py", line 939, in relative_to
    raise ValueError("{!r} is not in the subpath of {!r}"
ValueError: '/private/tmp/billlll' is not in the subpath of '/Users/segovia' OR one path is relative and the other is absolute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant