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.
1 parent 18ea7ff commit 7377659Copy full SHA for 7377659
src/build_scripts/copy_dir.py
@@ -1,4 +1,5 @@
1
# ruff: noqa: INP001
2
+import logging
3
import shutil
4
import sys
5
from pathlib import Path
@@ -18,13 +19,15 @@ def copy_files(source: Path, destination: Path) -> None:
18
19
20
if __name__ == "__main__":
21
if len(sys.argv) != 3:
22
+ logging.error("Script used incorrectly!\nUsage: python copy_dir.py <source_dir> <destination>")
23
sys.exit(1)
24
25
root_dir = Path(__file__).parent.parent.parent
26
src = Path(root_dir / sys.argv[1])
27
dest = Path(root_dir / sys.argv[2])
28
29
if not src.exists():
30
+ logging.error("Source directory %s does not exist", src)
31
32
33
copy_files(src, dest)
0 commit comments