env variable fix

This commit is contained in:
mrfry 2023-04-10 14:55:14 +02:00
parent d94bf74663
commit 509aff7cdd
2 changed files with 2 additions and 2 deletions

View file

@ -8,6 +8,6 @@ if [ ! -f "${domainPath}" ]; then
fi
domain=$(cat "${domainPath}")
DOMAIN="${domain}" npm run export
NEXT_PUBLIC_DOMAIN="${domain}" npm run export
echo "Exported with domain: '${domain}'"

View file

@ -1,7 +1,7 @@
// eslint-disable-next-line no-undef
const useLocalhost = process && process.env.NODE_ENV === 'development'
// eslint-disable-next-line no-undef
const domain = process && process.env.DOMAIN
const domain = process && process.env.NEXT_PUBLIC_DOMAIN
if (!domain && !useLocalhost) {
throw new Error('Domain is not defined! Please set DOMAIN env variable!')