Use project root constant instead of process.cwd()
This commit is contained in:
parent
7173ef1149
commit
c21d67b130
@ -4,9 +4,10 @@ import { ModrinthClient } from "@/lib/modrinth";
|
||||
import { CurseForgeClient } from "@/lib/curseforge";
|
||||
import type { Secrets } from "@/types";
|
||||
import { SecretsSchema } from "@/types";
|
||||
import { PROJECT_ROOT } from "root";
|
||||
|
||||
function loadSecrets(): Secrets {
|
||||
const secretsPath = path.join(process.cwd(), "secrets.json");
|
||||
const secretsPath = path.join(PROJECT_ROOT, "secrets.json");
|
||||
|
||||
let raw: unknown;
|
||||
try {
|
||||
|
||||
@ -3,9 +3,10 @@
|
||||
import { readdir, readFile, writeFile, unlink } from "fs/promises";
|
||||
import path from "path";
|
||||
import { ConfigSchema, type Config } from "@/types";
|
||||
import { PROJECT_ROOT } from "root";
|
||||
|
||||
function configDir(): string {
|
||||
return path.join(process.cwd(), "configs");
|
||||
return path.join(PROJECT_ROOT, "configs");
|
||||
}
|
||||
|
||||
function configPath(name: string): string {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user