Resolve output path to directory, making relative paths absolute.
(self, output_path: str)
| 341 | return copier.copy_for_qemu(output_dir, self.board_name) |
| 342 | |
| 343 | def _resolve_output_dir(self, output_path: str) -> Path: |
| 344 | """Resolve output path to directory, making relative paths absolute.""" |
| 345 | path = Path(output_path) |
| 346 | |
| 347 | # Extract directory from the path |
| 348 | if output_path.endswith(".bin"): |
| 349 | dir_path = path.parent |
| 350 | else: |
| 351 | dir_path = path |
| 352 | |
| 353 | # If path is relative, resolve it against project root |
| 354 | if not dir_path.is_absolute(): |
| 355 | # build_dir is like: /fastled/.build/pio/esp32dev |
| 356 | # Project root is 3 levels up from build_dir |
| 357 | project_root = self.build_dir.parent.parent.parent |
| 358 | dir_path = project_root / dir_path |
| 359 | |
| 360 | return dir_path |