Skip to content

Commit

Permalink
Merge pull request #49 from platformatic/set-runtime-context-before-g…
Browse files Browse the repository at this point in the history
…etting-fields

Sets isRuntimeContext to true before asking for fields
  • Loading branch information
marcopiraccini authored Dec 1, 2023
2 parents 43ed178 + 0e99738 commit f898e63
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export const prepareFolder = async (path, tempNames, logger, appName = 'appName'
// Get the template variables and return them here, if the template has a generator
if (template.Generator && typeof template.Generator === 'function') {
const gen = new template.Generator()
gen.setConfig({
isRuntimeContext: true
})
templateVariables[name] = gen.getConfigFieldsDefinitions()
}
}
Expand Down

0 comments on commit f898e63

Please sign in to comment.