Skip to content

Commit

Permalink
fix: Fix windows specific
Browse files Browse the repository at this point in the history
  • Loading branch information
3y3 committed Aug 10, 2024
1 parent aeedb69 commit 3b14793
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -e

BINDIR=$(dirname $0)
SRCDIR=$(dirname $(dirname $(node -pe "require('fs').realpathSync('$0')")))
SRCDIR=$(dirname $(dirname $(node -pe "require('fs').realpathSync('$0').replace('\\', '/')")))

while (( $# )); do
case "$1" in
Expand Down
5 changes: 3 additions & 2 deletions scripts/modify-ignore.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const {readFileSync, writeFileSync} = require('fs');
const {join} = require('node:path');
const {readFileSync, writeFileSync} = require('node:fs');

const SYSTEM = [
'.idea',
Expand Down Expand Up @@ -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 {
Expand Down
6 changes: 4 additions & 2 deletions scripts/modify-package.js
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 3b14793

Please sign in to comment.