Skip to content

Commit

Permalink
Fix format parsing from .ncurc files
Browse files Browse the repository at this point in the history
  • Loading branch information
jftanner committed Sep 21, 2024
1 parent 70377fe commit e8b022d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/getNcuRc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ async function getNcuRc({
}

// convert the config to valid options by removing $schema and parsing format
const { $schema: _, format, ...rawConfig } = rawResult?.config || {}
const { $schema: _, ...rawConfig } = rawResult?.config || {}
const config: Options = rawConfig
if (typeof format === 'string') config.format = format.split(',')
if (typeof config.format === 'string') config.format = cliOptionsMap.format.parse!(config.format)

// validate arguments here to provide a better error message
const unknownOptions = Object.keys(config).filter(arg => !cliOptionsMap[arg])
Expand Down

0 comments on commit e8b022d

Please sign in to comment.