Skip to content

Commit

Permalink
fix: use strings for 'boolean' env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiVandivier committed Aug 28, 2024
1 parent dc5efa6 commit eaf5e66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli/src/lib/env/getEnv.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ const getShellEnv = (config) => {
const shellEnv = {
name: config.title,
version: config.version,
loginApp: config.type === 'login_app' || undefined,
loginApp: config.type === 'login_app' ? 'true' : undefined,
direction: config.direction,
// NB: 'IS_PLUGIN' is added by string replacement in
// compiler/entrypoints.js, since env is shared between app and plugin
requiredProps: config.requiredProps?.join(),
skipPluginLogic: config.skipPluginLogic,
skipPluginLogic: config.skipPluginLogic ? 'true' : undefined,
...getPWAEnvVars(config),
}

Expand Down
3 changes: 2 additions & 1 deletion shell/src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ const parseRequiredProps = (propsEnvVariable) => {
// via string replacement in cli/src/lib/compiler/entrypoints.js
const isPlugin = self.__IS_PLUGIN

const skipPluginLogic = process.env.REACT_APP_DHIS2_APP_SKIPPLUGINLOGIC
const skipPluginLogic =
process.env.REACT_APP_DHIS2_APP_SKIPPLUGINLOGIC === 'true'
const requiredPluginProps = parseRequiredProps(
process.env.REACT_APP_DHIS2_APP_REQUIREDPROPS
)
Expand Down

0 comments on commit eaf5e66

Please sign in to comment.