Get path format for PlatformIO command line usage.
(path: Path)
| 543 | |
| 544 | |
| 545 | def get_platformio_command_path(path: Path) -> str: |
| 546 | """Get path format for PlatformIO command line usage.""" |
| 547 | import platform |
| 548 | |
| 549 | resolved_path = path.resolve() |
| 550 | |
| 551 | # On Windows, PlatformIO has issues with file:// URLs for local directories |
| 552 | # Use native Windows paths instead |
| 553 | if platform.system() == "Windows": |
| 554 | return str(resolved_path) |
| 555 | else: |
| 556 | # On Unix systems, use proper file:// URLs |
| 557 | posix_path = resolved_path.as_posix() |
| 558 | return f"file://{posix_path}" |
| 559 | |
| 560 | |
| 561 | def get_proper_file_url(path: Path) -> str: |
no test coverage detected