mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-10-18 17:33:30 -05:00
fix: refuse a --bios-dir that does not exist
This commit is contained in:
1 parent
4240c98359
commit
b23f5b04ad
7 files changed
+57
-1
No files matched your search
@@ -31,6 +31,17 @@ except ImportError:
|
||||
|
||||
|
||||
|
||||
def require_directory(path: str, flag: str = "--bios-dir") -> None:
|
||||
"""Stop on a folder that does not exist.
|
||||
|
||||
identity --strict, dedup, auto_fetch, romset_recipes and generate_pack
|
||||
read a mistyped --bios-dir as an empty collection and passed: 0
|
||||
conflicts, 0 duplicates, a pack of nothing.
|
||||
"""
|
||||
if not os.path.isdir(path):
|
||||
raise SystemExit(f"ERROR: {flag} {path} is not a directory")
|
||||
|
||||
|
||||
class DatabaseUnreadable(FileNotFoundError):
|
||||
"""The database a command was pointed at does not exist or is not JSON."""
|
||||
|
||||
|
||||
Reference in new issue
Block a user