()
| 430 | |
| 431 | |
| 432 | def calculate_node_path(): |
| 433 | node_version = os.environ.get("PYTHON_NODE_VERSION", None) |
| 434 | if node_version is None: |
| 435 | node_version = load_config_toml()["node-version"] |
| 436 | |
| 437 | subprocess.run( |
| 438 | [ |
| 439 | "bash", |
| 440 | "-c", |
| 441 | f"source ~/.nvm/nvm.sh && nvm install {node_version}", |
| 442 | ], |
| 443 | check=True, |
| 444 | ) |
| 445 | |
| 446 | res = subprocess.run( |
| 447 | [ |
| 448 | "bash", |
| 449 | "-c", |
| 450 | f"source ~/.nvm/nvm.sh && nvm which {node_version}", |
| 451 | ], |
| 452 | text=True, |
| 453 | capture_output=True, |
| 454 | check=True, |
| 455 | ) |
| 456 | return res.stdout.strip() |
| 457 | |
| 458 | |
| 459 | @subdir("host_dir", clean_ok=True) |
no test coverage detected
searching dependent graphs…