(package: str)
| 20 | |
| 21 | |
| 22 | def _install_global_package(package: str) -> None: |
| 23 | # example pio pkg -g -p "https://github.com/maxgerhardt/platform-raspberrypi.git". |
| 24 | locked_print(f"*** Installing {package} ***") |
| 25 | cmd_list = [ |
| 26 | "pio", |
| 27 | "pkg", |
| 28 | "install", |
| 29 | "-g", |
| 30 | "-p", |
| 31 | package, |
| 32 | ] |
| 33 | cmd_str = subprocess.list2cmdline(cmd_list) |
| 34 | locked_print(f"Running command:\n\n{cmd_str}\n\n") |
| 35 | result = subprocess.run( |
| 36 | cmd_str, |
| 37 | shell=True, |
| 38 | stdout=subprocess.PIPE, |
| 39 | stderr=subprocess.STDOUT, |
| 40 | text=True, |
| 41 | check=True, |
| 42 | ) |
| 43 | locked_print(result.stdout) |
| 44 | locked_print(f"*** Finished installing {package} ***") |
| 45 | |
| 46 | |
| 47 | def insert_tool_aliases(meta_json: dict[str, dict[str, Any]]) -> None: |
no test coverage detected