Skip to content

Commit

Permalink
fix: base url should be overridden with env var if present (#459)
Browse files Browse the repository at this point in the history
  • Loading branch information
ismay committed Sep 9, 2020
1 parent 8a645d2 commit 8768a1f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/src/commands/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ const setAppParameters = (standalone, config) => {
standalone === false ||
(typeof standalone === 'undefined' && !config.standalone)
) {
process.env.DHIS2_BASE_URL =
process.env.DHIS2_BASE_URL || config.coreApp ? `..` : `../../..`
const defaultBase = config.coreApp ? `..` : `../../..`
process.env.DHIS2_BASE_URL = process.env.DHIS2_BASE_URL || defaultBase

printBuildParam('DHIS2_BASE_URL', process.env.DHIS2_BASE_URL)
} else {
printBuildParam('DHIS2_BASE_URL', '<standalone>')
Expand Down

0 comments on commit 8768a1f

Please sign in to comment.