From c57ecb1131f13502c74124b0904980ac8139be31 Mon Sep 17 00:00:00 2001 From: mmckeen-nv <108093260+mmckeen-nv@users.noreply.github.com> Date: Wed, 3 Jun 2026 00:07:01 -0600 Subject: [PATCH] chore: sync NemoClaw installer pinning behavior (#19) Co-authored-by: Mark Mckeen --- install_versioned_nemoclaw_openshell.sh | 6 +++++- tests/portable-install-check.mjs | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/install_versioned_nemoclaw_openshell.sh b/install_versioned_nemoclaw_openshell.sh index 4d3afb5..5dd6c14 100755 --- a/install_versioned_nemoclaw_openshell.sh +++ b/install_versioned_nemoclaw_openshell.sh @@ -48,6 +48,8 @@ Environment overrides: OPENSHELL_INSTALL_URL NEMOCLAW_INSTALL_REF NEMOCLAW_INSTALL_TAG (legacy alias for NEMOCLAW_INSTALL_REF) + In curl pipes, set this on bash or export it first. Example: + curl -fsSL https://www.nvidia.com/nemoclaw.sh | NEMOCLAW_INSTALL_TAG=v0.0.56 bash NEMOCLAW_SOURCE_URL OPENCLAW_VERSION NEMOCLAW_BASE_IMAGE @@ -126,7 +128,9 @@ install_nemoclaw() { log "Cloning NemoClaw $NEMOCLAW_INSTALL_REF" git init --quiet "$source_dir" git -C "$source_dir" remote add origin "$NEMOCLAW_SOURCE_URL" - git -C "$source_dir" fetch --quiet --depth 1 origin "$NEMOCLAW_INSTALL_REF" + if ! git -C "$source_dir" fetch --quiet --depth 1 origin "$NEMOCLAW_INSTALL_REF"; then + fail "Requested NemoClaw install ref '$NEMOCLAW_INSTALL_REF' is not available from $NEMOCLAW_SOURCE_URL. Check NEMOCLAW_INSTALL_REF/NEMOCLAW_INSTALL_TAG and try again." + fi git -C "$source_dir" -c advice.detachedHead=false checkout --quiet --detach FETCH_HEAD [[ -n "$source_dir" && -f "$source_dir/install.sh" ]] || fail "Could not find NemoClaw install.sh in source checkout." diff --git a/tests/portable-install-check.mjs b/tests/portable-install-check.mjs index 8f066fd..1ecf837 100644 --- a/tests/portable-install-check.mjs +++ b/tests/portable-install-check.mjs @@ -59,6 +59,10 @@ assert.match(versionedInstallSource, /NEMOCLAW_INSTALL_REF="\$\{NEMOCLAW_INSTALL assert.match(versionedInstallSource, /NEMOCLAW_SOURCE_URL="\$\{NEMOCLAW_SOURCE_URL:-https:\/\/github\.com\/NVIDIA\/NemoClaw\.git\}"/, 'versioned installer must use the NemoClaw source repository URL') assert.match(versionedInstallSource, /https:\/\/raw\.githubusercontent\.com\/NVIDIA\/OpenShell\/main\/install\.sh/, 'versioned installer must use the OpenShell installer URL') assert.match(versionedInstallSource, /git -C "\$source_dir" fetch[\s\S]*"\$NEMOCLAW_INSTALL_REF"/, 'versioned installer must fetch NemoClaw from the selected git ref') +assert.match(versionedInstallSource, /Requested NemoClaw install ref/, 'versioned installer must fail clearly when the selected NemoClaw ref is unavailable') +assert.match(versionedInstallSource, /Check NEMOCLAW_INSTALL_REF\/NEMOCLAW_INSTALL_TAG/, 'missing NemoClaw ref errors must tell operators which pinning variables to check') +assert.match(versionedInstallSource, /set this on bash or export it first/, 'versioned installer help must explain curl-pipe ref pinning') +assert.match(versionedInstallSource, /curl -fsSL https:\/\/www\.nvidia\.com\/nemoclaw\.sh \| NEMOCLAW_INSTALL_TAG=v0\.0\.56 bash/, 'versioned installer help must include the safe curl-pipe pinning placement') assert.match(versionedInstallSource, /OPENSHELL_VERSION="\$OPENSHELL_VERSION" sh/, 'versioned installer must pass the selected OpenShell version to upstream install.sh') assert.match(versionedInstallSource, /NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE="\$NEMOCLAW_ACCEPT_THIRD_PARTY_SOFTWARE"/, 'versioned installer must support non-interactive third-party acceptance') assert.match(versionedInstallSource, /NEMOCLAW_NON_INTERACTIVE="\$NEMOCLAW_NON_INTERACTIVE"/, 'versioned installer must run NemoClaw non-interactively by default')