Skip to content

Commit

Permalink
Merge pull request #86 from mikechernev/master
Browse files Browse the repository at this point in the history
Change `yaml.safeLoad` to `yaml.load` because it is breaking the Update Template CI jobs
  • Loading branch information
AnandChowdhary authored Jan 5, 2021
2 parents 44eb2c4 + 49821d4 commit a95a7d9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/helpers/config.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { readFile } from "fs-extra";
import { safeLoad } from "js-yaml";
import { load } from "js-yaml";
import { join } from "path";
import { UpptimeConfig } from "../interfaces";

let __config: UpptimeConfig | undefined = undefined;
export const getConfig = async (): Promise<UpptimeConfig> => {
if (__config) return __config;
const config = safeLoad(await readFile(join(".", ".upptimerc.yml"), "utf8")) as UpptimeConfig;
const config = load(await readFile(join(".", ".upptimerc.yml"), "utf8")) as UpptimeConfig;
__config = config;
return config;
};

0 comments on commit a95a7d9

Please sign in to comment.