-
Notifications
You must be signed in to change notification settings - Fork 20
Open
Description
On macOS and Linux, HOMEDRIVE and HOMEPATH env vars are undefined. The expression process.env.HOMEDRIVE + process.env.HOMEPATH evaluates to NaN (number), which is then passed to fs.existsSync().
Node 24 deprecated non-string arguments to fs.existsSync (DEP0187), and this triggers a deprecation warning which causes node:test to fail an entire AAT test file.
Location: lib/util/constants.js:17
export const HOME_DIRECTORY = [
process.env.HOME,
(process.env.HOMEDRIVE + process.env.HOMEPATH), // ← NaN on non-Windows
process.env.USERPROFILE,
'/tmp',
'/temp'
].filter(fs.existsSync)[0]Suggested fix: Guard the concatenation and filter out non-string values before calling existsSync.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
New