From db9d116673939063e7f454797951222fba300ff9 Mon Sep 17 00:00:00 2001 From: Viacheslav Turovskyi Date: Sat, 3 Aug 2024 20:05:25 +0000 Subject: [PATCH] fix test errors --- src/util.ts | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/util.ts b/src/util.ts index 123c5b1..0651d67 100644 --- a/src/util.ts +++ b/src/util.ts @@ -84,14 +84,9 @@ export const resolve = async (files: string | string[], options: any) => { for (const file of files) { const prevDir = process.cwd(); - let filePath: any = file.split(path.sep); - - if (filePath.length > 1) { - filePath.pop(); - filePath = filePath.join(path.sep); - } else { - filePath = './'; - } + let filePath: any = file.split('/'); + filePath.pop(); + filePath = filePath.join('/'); let readFile: any = readFileSync(file, 'utf-8'); // eslint-disable-line readFile = toJS(readFile);