Skip to content

Commit

Permalink
Merge pull request #449 from AlanDellonSchwartzman/development
Browse files Browse the repository at this point in the history
fix parse config fieldOverrides
  • Loading branch information
beepsoft authored Sep 3, 2024
2 parents c962c47 + c5bc244 commit 7d473fc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions generator/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,18 @@ exports.mergeConfigs = function mergeConfigs(args, config) {
!!args["--useIdentifierNumber"] || config.useIdentifierNumber,
fieldOverrides: args["--fieldOverrides"]
? parseFieldOverrides(args["--fieldOverrides"])
: config.fieldOverrides,
: parseFieldOverrides(config.fieldOverrides),
dynamicArgs: !!args["--dynamicArgs"] || config.dynamicArgs,
debug: !!args["--debug"] || config.debug,
disableLogColors: !!args["--disableLogColors"] || config.disableLogColors
}
}

const parseFieldOverrides = (fieldOverrides) => {
return fieldOverrides
.split(",")
const _fieldOverrides =
Array.isArray(fieldOverrides) ? fieldOverrides : fieldOverrides.split(",");

return _fieldOverrides
.map((s) => s.trim())
.map((item) => {
const override = item.split(":").map((s) => s.trim())
Expand Down

0 comments on commit 7d473fc

Please sign in to comment.