Conversation
Pins PR NousResearch#37702: scripts/install.ps1 should only run `git submodule update --init --recursive` when the checkout declares a .gitmodules, otherwise print a skip notice and continue. Static guards inspect install.ps1 text; pwsh-backed behavioral tests run the extracted block with a stubbed git (skipped without PowerShell). The suite skips entirely until the NousResearch#37702 guard is present, so it stays green on main and activates automatically once the fix lands.
xxxigm
force-pushed
the
test/install-ps1-skip-empty-submodules
branch
from
June 3, 2026 00:12
6b1b0b4 to
a2ec313
Compare
Collaborator
|
won't fix. see #37702 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds test-only coverage for the Windows-installer fix proposed in #37702, which makes
scripts/install.ps1skipgit submodule update --init --recursivewhen the checkout declares no submodules.This PR does not modify
scripts/install.ps1— it only adds tests. The suite skips itself until the #37702 guard is present, so it stays green onmaintoday and activates automatically once #37702 lands (or is applied alongside).Background
Hermes ships no
.gitmodules, yet the installer always rangit submodule, which on some Windows hosts fails through Git-for-Windows' shell-helper path (git-sh-i18n: No such file or directory). #37702 wraps the step inif (Test-Path ".gitmodules")and prints a skip notice otherwise. That PR left the test checklist items unticked; this PR supplies them.Type of Change
Changes Made
tests/test_install_ps1_skip_empty_submodules.py(new):git submodule update --init --recursivelives inside theif (Test-Path ".gitmodules")branch.elsebranch printsNo submodules declared; skipping submodule init.pwsh/powershellis absent, e.g. Linux/macOS CI): execute the extracted block with a stubbedgitand assertgit submoduleruns only when.gitmodulesis present.install.ps1contains the fix(install): skip submodule init when none declared #37702 guard, so it never fails onmainbefore the fix merges.How to Test
main(no guard yet):5 skipped.3 passed, 2 skipped(the 2 behavioral tests run when PowerShell is installed).Documentation
Reviewed docs for submodule references. The installer change has no user-facing docs to update. The remaining
git submodulementions (website/docs/getting-started/termux.md,updating.md) describe manual git workflows and are harmless no-ops on a repo without.gitmodules— out of scope here.Checklist
pytest tests/test_install_ps1_skip_empty_submodules.py -qpasses (5 skipped on main; 3 passed / 2 skipped with the fix)