Skip to content

Commit fc41337

Browse files
committed
Fix lookup
1 parent f2753ec commit fc41337

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

bin/cnyks.js

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,12 @@ var module_name = path.basename(module_path);
2323

2424

2525
try {
26-
try {
27-
module_path = require.resolve(module_path);
28-
} catch(e) {
29-
try {
30-
module_path = require.resolve(path.resolve(module_path));
31-
} catch(e) {
32-
module_path = require.resolve(path.resolve("node_modules", module_path));
33-
}
34-
}
26+
module_path = require.resolve(module_path, {paths : ['.']});
3527
} catch(e) {
3628
throw Error(`Invalid module name, ${module_name}`);
3729
}
3830

31+
3932
var module = require(module_path);
4033

4134

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@
4040
},
4141
"devDependencies": {
4242
"browserify-wrap": "^1.0.1",
43-
"eslint-plugin-ivs": "^1.0.7",
43+
"eslint": "^8.57.0",
44+
"eslint-plugin-ivs": "^4.0.1",
4445
"expect.js": "^0.3.1",
4546
"mocha": "^3.1.2",
4647
"nyc": "^15.1.0",

0 commit comments

Comments
 (0)