From 6920c7c867982548b3803e420bb41df23e6335fc Mon Sep 17 00:00:00 2001 From: Ben Allfree Date: Wed, 24 Apr 2024 12:08:09 -0700 Subject: [PATCH] wiip --- plop/commands/helpers/cleanVerdaccioPackages.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plop/commands/helpers/cleanVerdaccioPackages.ts b/plop/commands/helpers/cleanVerdaccioPackages.ts index 35cdfa9..c2b8ac0 100644 --- a/plop/commands/helpers/cleanVerdaccioPackages.ts +++ b/plop/commands/helpers/cleanVerdaccioPackages.ts @@ -1,5 +1,5 @@ import { existsSync, readFileSync, writeFileSync } from 'fs' -import { join } from 'path' +import { join, resolve } from 'path' import type { CustomActionFunction } from 'plop' import { parse } from 'yaml' import { PACKAGE_ROOT } from '../../../src/util/getApp' @@ -15,7 +15,7 @@ export const cleanVerdaccioPackages = ( onProgress(`Cleaning verdaccio packages ${packageNames.join(`, `)}`) const configYaml = parse(readFileSync(VERDACCIO_CONFIG_PATH).toString()) const { storage } = configYaml - const dbPath = join(storage, `.verdaccio-db.json`) + const dbPath = resolve(PACKAGE_ROOT, storage, `.verdaccio-db.json`) if (existsSync(dbPath)) { const db = JSON.parse(readFileSync(dbPath).toString()) as { list: string[]