Skip to content

Commit b0c67a6

Browse files
authored
chore: use process.cwd to get current process path
1 parent d1c6fbb commit b0c67a6

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

frameworks/angular-slickgrid/scripts/replace-workspace.mjs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
import { existsSync, readFileSync } from 'node:fs';
2-
import { dirname, join, resolve } from 'node:path';
3-
import { fileURLToPath } from 'node:url';
2+
import { join, resolve } from 'node:path';
43

54
import { readJsonSync, writeJsonSync } from '@gc-utils/fs-extra';
65
import { parse } from 'yaml';
76

8-
const __filename = fileURLToPath(import.meta.url);
9-
const __dirname = dirname(__filename);
10-
const processPath = join(__dirname, '../');
11-
const projectRootPath = join(__dirname, '../../../'); // project root from current script location
7+
const cwd = process.cwd();
8+
const processPath = join(cwd, '../');
9+
const projectRootPath = join(cwd, '../../../'); // project root from current script location
1210

1311
const MONOREPO_NAMESPACE = '@slickgrid-universal';
1412

0 commit comments

Comments
 (0)