diff --git a/d2js/js/make.sh b/d2js/js/make.sh index b1537b6fe0..44535f5640 100755 --- a/d2js/js/make.sh +++ b/d2js/js/make.sh @@ -8,8 +8,14 @@ fi . "$(dirname "$0")/../../ci/sub/lib.sh" PATH="$(cd -- "$(dirname "$0")" && pwd)/../../ci/sub/bin:$PATH" cd -- "$(dirname "$0")" + +if ! command -v bun >/dev/null && [ -n "${CI-}" ]; then + curl -fsSL https://bun.sh/install | sh -s -- +fi + if ! bun --version >/dev/null 2>&1; then - echoerr "You need bun to build d2js." + echoerr "You need bun to build d2.js: curl -fsSL https://bun.sh/install | bash" exit 1 fi + _make "$@"