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 48a2e64
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
10 changes: 8 additions & 2 deletions bin/lint
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@

set -e

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

BINDIR=$(dirname "$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 48a2e64

Please sign in to comment.