Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions scripts/install-openshell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,10 @@ install_macos_homebrew_formula() {
chmod 0644 "$tap_formula_file"

formula_ref="${HOMEBREW_TAP}/${HOMEBREW_FORMULA_NAME}"
if brew help trust >/dev/null 2>&1; then
brew trust --formula "$formula_ref" \
|| fail "Homebrew refused to trust the checksum-verified OpenShell formula ${formula_ref}"
fi
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
if brew list --formula "$HOMEBREW_FORMULA_NAME" >/dev/null 2>&1; then
info "reinstalling OpenShell with Homebrew..."
brew reinstall --formula "$formula_ref"
Expand Down
10 changes: 9 additions & 1 deletion test/install-openshell-version-check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ exit 0`,
}
});

it("installs macOS OpenShell through the Homebrew formula without starting the service", () => {
it("trusts and installs the verified macOS Homebrew formula without starting the service", () => {
const tmp = fs.mkdtempSync(path.join(os.tmpdir(), "nemoclaw-openshell-macos-formula-"));
try {
const fakeBin = path.join(tmp, "bin");
Expand Down Expand Up @@ -633,6 +633,12 @@ case "$*" in
printf '%s\\n' ${JSON.stringify(tapRepo)}
exit 0
;;
"help trust")
exit 0
;;
"trust --formula nvidia/openshell/openshell")
exit 0
;;
"list --formula openshell")
exit 1
;;
Expand Down Expand Up @@ -679,6 +685,8 @@ exit 1`,
"tap-info nvidia/openshell",
"tap-new --no-git nvidia/openshell",
"--repository nvidia/openshell",
"help trust",
"trust --formula nvidia/openshell/openshell",
"list --formula openshell",
"install --formula nvidia/openshell/openshell",
"--prefix",
Expand Down
Loading