mirror of
https://github.com/nodejs/node.git
synced 2026-11-29 14:27:57 -05:00
path: indicate index of wrong resolve() parameter
PR-URL: https://github.com/nodejs/node/pull/47660 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
This commit is contained in:
1 parent
8bcfcc0af9
commit
b34eaf393e
1 file changed
+2
-3
+2
-3
@@ -164,7 +164,7 @@ const win32 = {
|
||||
let path;
|
||||
if (i >= 0) {
|
||||
path = args[i];
|
||||
validateString(path, 'path');
|
||||
validateString(path, `paths[${i}]`);
|
||||
|
||||
// Skip empty entries
|
||||
if (path.length === 0) {
|
||||
@@ -1094,8 +1094,7 @@ const posix = {
|
||||
|
||||
for (let i = args.length - 1; i >= -1 && !resolvedAbsolute; i--) {
|
||||
const path = i >= 0 ? args[i] : posixCwd();
|
||||
|
||||
validateString(path, 'path');
|
||||
validateString(path, `paths[${i}]`);
|
||||
|
||||
// Skip empty entries
|
||||
if (path.length === 0) {
|
||||
|
||||
Reference in new issue
Block a user