Skip to content

Commit

Permalink
Remove undefined realpath stub file and use the native variant
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed Jan 21, 2025
1 parent 99b086a commit 6956020
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,10 @@ const lazyRootDistPath = () =>
const lazyRootPath = () =>
// The '@rollup/plugin-replace' will replace 'process.env.TAP' with `false` and
// it will be dead code eliminated by Rollup.
path.resolve(realpathSync(__dirname), process.env['TAP'] ? '../..' : '..')
path.resolve(
realpathSync.native(__dirname),
process.env['TAP'] ? '../..' : '..'
)

const lazyRootPkgJsonPath = () =>
// Lazily access constants.rootPath.
Expand Down
2 changes: 1 addition & 1 deletion src/shadow/npm-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { findRoot } from '../utils/path-resolve'

const { NODE_MODULES, SOCKET_CLI_ISSUES_URL } = constants

const npmEntrypoint = realpathSync(process.argv[1]!)
const npmEntrypoint = realpathSync.native(process.argv[1]!)
const npmRootPath = findRoot(path.dirname(npmEntrypoint))
if (npmRootPath === undefined) {
console.error(
Expand Down
Empty file.

0 comments on commit 6956020

Please sign in to comment.