Skip to content

Commit b34eaf3

Browse files
sosobaMoLow
authored andcommitted
path: indicate index of wrong resolve() parameter
PR-URL: #47660 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Deokjin Kim <deokjin81.kim@gmail.com>
1 parent 8bcfcc0 commit b34eaf3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

‎lib/path.js‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ const win32 = {
164164
letpath;
165165
if(i>=0){
166166
path=args[i];
167-
validateString(path,'path');
167+
validateString(path,`paths[${i}]`);
168168

169169
// Skip empty entries
170170
if(path.length===0){
@@ -1094,8 +1094,7 @@ const posix = {
10941094

10951095
for(leti=args.length-1;i>=-1&&!resolvedAbsolute;i--){
10961096
constpath=i>=0 ? args[i] : posixCwd();
1097-
1098-
validateString(path,'path');
1097+
validateString(path,`paths[${i}]`);
10991098

11001099
// Skip empty entries
11011100
if(path.length===0){

0 commit comments

Comments
 (0)