We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Path.relative_to()
1 parent ec406ff commit 2aea99dCopy full SHA for 2aea99d
devtools/__main__.py
@@ -64,7 +64,9 @@ def install() -> int:
64
print(f'Found path `{install_path}` to install devtools into `builtins`')
65
print('To install devtools, run the following command:\n')
66
print(f' python -m devtools print-code >> {install_path}\n')
67
- if not install_path.is_relative_to(Path.home()):
+ try:
68
+ install_path.relative_to(Path.home())
69
+ except ValueError:
70
print('or maybe\n')
71
print(f' python -m devtools print-code | sudo tee -a {install_path} > /dev/null\n')
72
print('Note: "sudo" might be required because the path is in your home directory.')
0 commit comments