From 255914820f7dfc46ca14b957e369de47be5e7484 Mon Sep 17 00:00:00 2001 From: 3y3 <3y3@ya.ru> Date: Sun, 11 Aug 2024 02:26:35 +0300 Subject: [PATCH] fix: Fix windows specific --- scripts/modify-ignore.js | 5 +++-- scripts/modify-package.js | 6 ++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/modify-ignore.js b/scripts/modify-ignore.js index 4369684..a48565a 100644 --- a/scripts/modify-ignore.js +++ b/scripts/modify-ignore.js @@ -1,4 +1,5 @@ -const {readFileSync, writeFileSync} = require('fs'); +const {join} = require('node:path'); +const {readFileSync, writeFileSync} = require('node:fs'); const SYSTEM = [ '.idea', @@ -49,7 +50,7 @@ const ignores = { }; for (const [file, list] of Object.entries(ignores)) { - const filename = process.cwd() + '/' + file; + const filename = join(process.cwd(), file); let source; try { diff --git a/scripts/modify-package.js b/scripts/modify-package.js index 862ef4e..6a64825 100644 --- a/scripts/modify-package.js +++ b/scripts/modify-package.js @@ -1,5 +1,7 @@ -const filename = process.cwd() + '/package.json'; -const {readFileSync, writeFileSync} = require('fs'); +const {join} = require('node:path'); +const {readFileSync, writeFileSync} = require('node:fs'); + +const filename = join(process.cwd(), 'package.json'); let pkg; try {