File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -109,10 +109,13 @@ def convert_filename(
109
109
if not filename .exists ():
110
110
# how node.js loads dependencies from node_modules:
111
111
# https://nodejs.org/api/modules.html#loading-from-node_modules-folders
112
- for folder in cwd .parents :
113
- if folder .joinpath (Path ("node_modules" ), filename ).exists ():
114
- filename = folder .joinpath ("node_modules" , filename )
115
- break
112
+ if cwd .joinpath (Path ("node_modules" ), filename ).exists ():
113
+ filename = cwd .joinpath ("node_modules" , filename )
114
+ else :
115
+ for folder in cwd .parents :
116
+ if folder .joinpath (Path ("node_modules" ), filename ).exists ():
117
+ filename = folder .joinpath (Path ("node_modules" ), filename )
118
+ break
116
119
if not filename .exists ():
117
120
if cwd .joinpath (Path ("contracts" ), filename ).exists ():
118
121
filename = cwd .joinpath ("contracts" , filename )
You can’t perform that action at this time.
0 commit comments