Skip to content

Commit

Permalink
fix: handle undefined node options
Browse files Browse the repository at this point in the history
  • Loading branch information
mdonnalley committed May 24, 2024
1 parent 72be5ca commit ce9215a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tarballs/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export async function buildConfig(
const updateConfig = (config.pjson.oclif.update || {}) as UpdateConfig
updateConfig.s3 = updateConfig.s3 || {}
const nodeVersion = updateConfig.node?.version || process.versions.node
const nodeOptions = castArray((updateConfig.node as {options?: string | string[]}).options ?? [])
const nodeOptions = castArray((updateConfig.node ?? ({} as {options?: string | string[]})).options ?? [])
const targets = compact(options.targets || updateConfig.node?.targets || TARGETS)
.filter((t) => {
if (t === 'darwin-arm64' && semver.lt(nodeVersion, '16.0.0')) {
Expand Down

0 comments on commit ce9215a

Please sign in to comment.