Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
fail-fast: false
matrix:
example:
- bun
- c
- cpp
- csharp
Expand Down
3 changes: 1 addition & 2 deletions crates/hm-dsl-engine/harmont-py/harmont/_bun.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def _make_bun(
) -> BunProject:
if version is not None and not _VERSION_RE.match(version):
msg = (
f"hm.bun: invalid version {version!r}\n"
' → use a semver version like "1.2.0" or "1.2"'
f'hm.bun: invalid version {version!r}\n → use a semver version like "1.2.0" or "1.2"'
)
raise ValueError(msg)
bun_installed = make_install_chain(
Expand Down
5 changes: 1 addition & 4 deletions crates/hm-dsl-engine/harmont-py/harmont/_toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,7 @@ def node_install_cmd(version: str) -> str:
def bun_install_cmd(version: str | None = None) -> str:
"""Bun install command. Installs to /usr/local/bin for PATH availability."""
version_arg = f' -s "bun-v{version}"' if version is not None else ""
return (
"curl -fsSL https://bun.sh/install | "
f"BUN_INSTALL=/usr/local bash{version_arg}"
)
return f"curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash{version_arg}"


def make_install_chain(
Expand Down
7 changes: 3 additions & 4 deletions crates/hm-dsl-engine/harmont-py/tests/test_bun.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

from __future__ import annotations

import pytest

import harmont as hm
from harmont._toolchain import bun_install_cmd


Expand All @@ -21,10 +24,6 @@ def test_bun_install_cmd_version():
# BunProject / _BunEntry integration tests
# ---------------------------------------------------------------------------

import pytest

import harmont as hm


def _cmds(p: dict) -> list[str]:
return [n["step"]["cmd"] for n in p["graph"]["nodes"]]
Expand Down
Loading