Skip to content

Commit 2865bb4

Browse files
committed
fix(cli): use bracket notation for hyphenated tool keys in error message
Cursor flagged the checksum-missing error in downloads.mts: it used \`tools.\${toolName}.checksums\` (dot notation) which produces an invalid JSONPath like \`tools.socket-patch.checksums\` when toolName is hyphenated. The socket-basics site a few hundred lines down already uses bracket notation for the same reason; make this one match. Reported on PR #1258.
1 parent 7381d9a commit 2865bb4

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/cli/scripts/sea-build-utils/downloads.mts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ export async function downloadExternalTools(platform, arch, isMusl = false) {
333333

334334
if (!sha256) {
335335
throw new Error(
336-
`bundle-tools.json tools.${toolName}.checksums has no entry for "${assetName}" (seen: ${joinAnd(Object.keys(toolConfig?.checksums ?? {})) || '<empty>'}); run \`pnpm run sync-checksums\` to populate — builds must verify every external download`,
336+
`bundle-tools.json tools["${toolName}"].checksums has no entry for "${assetName}" (seen: ${joinAnd(Object.keys(toolConfig?.checksums ?? {})) || '<empty>'}); run \`pnpm run sync-checksums\` to populate — builds must verify every external download`,
337337
)
338338
}
339339

pnpm-lock.yaml

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)