fix path.join import

pull/62/head v0.2.4
Ben Phelps 2 years ago
parent cf39395924
commit 939f5d7c20

@ -1,4 +1,4 @@
import { join, path } from "path"; import { join } from "path";
import { existsSync, copyFile, promises as fs } from "fs"; import { existsSync, copyFile, promises as fs } from "fs";
import yaml from "js-yaml"; import yaml from "js-yaml";
@ -19,7 +19,7 @@ export default function checkAndCopyConfig(config) {
export async function getSettings() { export async function getSettings() {
checkAndCopyConfig("settings.yaml"); checkAndCopyConfig("settings.yaml");
const settingsYaml = path.join(process.cwd(), "config", "settings.yaml"); const settingsYaml = join(process.cwd(), "config", "settings.yaml");
const fileContents = await fs.readFile(settingsYaml, "utf8"); const fileContents = await fs.readFile(settingsYaml, "utf8");
return yaml.load(fileContents); return yaml.load(fileContents);
} }

Loading…
Cancel
Save