mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-08 11:30:12 +08:00
fix: issue #96
This commit is contained in:
1 parent
712a1ff319
commit
4b9c7de031
2 files changed
+4
-9
No files matched your search
@@ -1,5 +0,0 @@
|
|||||||
BASE_URL=https://example.com
|
|
||||||
GOOGLE_CLIENT_ID=
|
|
||||||
GOOGLE_CLIENT_SECRET=
|
|
||||||
GITHUB_CLIENT_ID=
|
|
||||||
GITNUB_CLIENT_SECRET=
|
|
||||||
@@ -6,8 +6,8 @@ const getConfig = (key, defaultValue) => {
|
|||||||
return process.env[key] || defaultValue
|
return process.env[key] || defaultValue
|
||||||
}
|
}
|
||||||
|
|
||||||
const getOrFail = (key) => {
|
const getOrFail = (key, defaultValue=undefined) => {
|
||||||
const value = getConfig(key)
|
const value = getConfig(key, defaultValue)
|
||||||
if (!value) {
|
if (!value) {
|
||||||
throw new Error(`Missing required environment variable ${key}`)
|
throw new Error(`Missing required environment variable ${key}`)
|
||||||
}
|
}
|
||||||
@@ -25,8 +25,8 @@ module.exports = defineConfig({
|
|||||||
retries: { runMode: 5, openMode: 5 },
|
retries: { runMode: 5, openMode: 5 },
|
||||||
},
|
},
|
||||||
env: {
|
env: {
|
||||||
defaultAccount: getOrFail('TESTING_USERNAME'),
|
defaultAccount: getOrFail('TESTING_USERNAME', 'alex'),
|
||||||
defaultPassword: getOrFail('TESTING_PASSWORD'),
|
defaultPassword: getOrFail('TESTING_PASSWORD', 'Alex1234'),
|
||||||
isCHVersion: true,
|
isCHVersion: true,
|
||||||
// google_username: process.env.GOOGLE_USERNAME,
|
// google_username: process.env.GOOGLE_USERNAME,
|
||||||
// google_password: process.env.GOOGLE_PASSWORD,
|
// google_password: process.env.GOOGLE_PASSWORD,
|
||||||
|
|||||||
Reference in new issue
Block a user