Fix cache dir path (#478)

This commit is contained in:
Andrew Branch
2022-06-09 12:46:09 -07:00
committed by GitHub
parent e377a7eaac
commit 3f2f642501
2 changed files with 3 additions and 1 deletions

View File

@@ -2,3 +2,4 @@ import { joinPaths } from "../fs";
const root = joinPaths(__dirname, "..", "..");
const storageDirPath = process.env.STORAGE_DIR || root;
export const logDir = joinPaths(storageDirPath, "logs");
export const cacheDirPath = joinPaths(storageDirPath, "cache");

View File

@@ -4,11 +4,12 @@ import { resolve as resolveUrl } from "url";
import { joinPaths } from "./fs";
import { Logger } from "./logging";
import { createTgz } from "./io";
import { cacheDirPath } from "./lib/settings.js";
export const npmRegistryHostName = "registry.npmjs.org";
export const npmRegistry = `https://${npmRegistryHostName}/`;
export const defaultCacheDir = joinPaths(__dirname, "..", "cache");
export const defaultCacheDir = cacheDirPath;
type NeedToFixNpmRegistryClientTypings = any;