fix: refuse a missing emulator profile directory

This commit is contained in:
Abdessamad Derraz committed 2026-11-06 03:21:53 +01:00
1 parent 1c3462e7fd
commit 6445e5d7d6
7 files changed
+91 -21

No files matched your search

+2 -1
View File
@@ -25,7 +25,7 @@ from pathlib import Path
sys.path.insert(0, os.path.dirname(__file__))
import upstream
from common import suggest_names
from common import require_directory, suggest_names
from profile_sync import collect_citations, ref_role, select_views, split_source_ref
from safeparse import yaml_load
@@ -122,6 +122,7 @@ def main() -> None:
args = parser.parse_args()
if args.all == bool(args.emulators):
parser.error("name profiles or pass --all, not both")
require_directory(args.emulators_dir, "--emulators-dir")
known = sorted(path.stem for path in Path(args.emulators_dir).glob("*.yml"))
unknown = [name for name in args.emulators if name not in known]