mirror of
https://github.com/github/awesome-copilot.git
synced 2026-02-22 19:35:13 +00:00
fix: Revised error messages and filename sanitization processing
- Improved error messages within the `find_library_file` function to include directory names - Organized comments within the `sanitize_filename` function - Improved error messages within the `split_library` function to include directory names
This commit is contained in:
@@ -65,12 +65,12 @@ def find_library_file(directory: Path) -> Path:
|
|||||||
|
|
||||||
if len(library_files) == 0:
|
if len(library_files) == 0:
|
||||||
print(f"Error: No .excalidrawlib file found in {directory}")
|
print(f"Error: No .excalidrawlib file found in {directory}")
|
||||||
print(f"Please place a .excalidrawlib file in this directory first.")
|
print(f"Please place a .excalidrawlib file in {directory} first.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
if len(library_files) > 1:
|
if len(library_files) > 1:
|
||||||
print(f"Error: Multiple .excalidrawlib files found in {directory}")
|
print(f"Error: Multiple .excalidrawlib files found in {directory}")
|
||||||
print(f"Please keep only one library file in the directory.")
|
print(f"Please keep only one library file in {directory}.")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
return library_files[0]
|
return library_files[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user