mirror of
https://github.com/fosrl/pangolin.git
synced 2025-06-25 06:38:49 +02:00
log url to docs if config error
This commit is contained in:
parent
516c68224a
commit
7ff5376d13
1 changed files with 11 additions and 2 deletions
|
@ -3,7 +3,12 @@ import yaml from "js-yaml";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
import { fromError } from "zod-validation-error";
|
import { fromError } from "zod-validation-error";
|
||||||
import { __DIRNAME, APP_PATH, configFilePath1, configFilePath2 } from "@server/lib/consts";
|
import {
|
||||||
|
__DIRNAME,
|
||||||
|
APP_PATH,
|
||||||
|
configFilePath1,
|
||||||
|
configFilePath2
|
||||||
|
} from "@server/lib/consts";
|
||||||
import { loadAppVersion } from "@server/lib/loadAppVersion";
|
import { loadAppVersion } from "@server/lib/loadAppVersion";
|
||||||
import { passwordSchema } from "@server/auth/passwordSchema";
|
import { passwordSchema } from "@server/auth/passwordSchema";
|
||||||
|
|
||||||
|
@ -132,6 +137,9 @@ export class Config {
|
||||||
);
|
);
|
||||||
environment = loadConfig(configFilePath1);
|
environment = loadConfig(configFilePath1);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
console.log(
|
||||||
|
"See the docs for information about what to include in the configuration file: https://docs.fossorial.io/Pangolin/Configuration/config"
|
||||||
|
);
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
`Error creating configuration file from example: ${
|
`Error creating configuration file from example: ${
|
||||||
|
@ -187,7 +195,8 @@ export class Config {
|
||||||
?.disable_user_create_org
|
?.disable_user_create_org
|
||||||
? "true"
|
? "true"
|
||||||
: "false";
|
: "false";
|
||||||
process.env.RESOURCE_ACCESS_TOKEN_PARAM = parsedConfig.data.server.resource_access_token_param;
|
process.env.RESOURCE_ACCESS_TOKEN_PARAM =
|
||||||
|
parsedConfig.data.server.resource_access_token_param;
|
||||||
|
|
||||||
this.rawConfig = parsedConfig.data;
|
this.rawConfig = parsedConfig.data;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue