File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 66from pathlib import Path
77from typing import Any , List , Dict , Tuple
88
9- from chipflow_lib import _parse_config , ChipFlowError
9+ from chipflow_lib import _parse_config , _ensure_chipflow_root , ChipFlowError
1010from chipflow_lib .platforms import PACKAGE_DEFINITIONS , PIN_ANNOTATION_SCHEMA , top_interfaces
1111from chipflow_lib .platforms .utils import LockFile , Package , PortMap , Port
1212from chipflow_lib .config_models import Config
@@ -86,7 +86,8 @@ def lock_pins() -> None:
8686 used_pins = set ()
8787 oldlock = None
8888
89- lockfile = Path ('pins.lock' )
89+ chipflow_root = _ensure_chipflow_root ()
90+ lockfile = Path (chipflow_root , 'pins.lock' )
9091 if lockfile .exists ():
9192 json_string = lockfile .read_text ()
9293 oldlock = LockFile .model_validate_json (json_string )
@@ -167,7 +168,7 @@ def lock_pins() -> None:
167168 port_map = port_map ,
168169 metadata = interfaces )
169170
170- with open ('pins.lock' , 'w' ) as f :
171+ with open (lockfile , 'w' ) as f :
171172 f .write (newlock .model_dump_json (indent = 2 , serialize_as_any = True ))
172173
173174
You can’t perform that action at this time.
0 commit comments