From bcf427a3be685a468b763d1ce87cabd3f287c26a Mon Sep 17 00:00:00 2001 From: Sam Szreter Date: Sun, 11 Aug 2019 18:23:23 +0300 Subject: [PATCH] Fix ospec --require with relative paths (#2511) --- docs/change-log.md | 2 ++ ospec/bin/ospec | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/change-log.md b/docs/change-log.md index 85858b96..3d5d786e 100644 --- a/docs/change-log.md +++ b/docs/change-log.md @@ -17,6 +17,8 @@ ### Upcoming... +- Fix `ospec require` with relative paths + --> ### v2.0.3 diff --git a/ospec/bin/ospec b/ospec/bin/ospec index a4a6f2d0..80a21bf1 100755 --- a/ospec/bin/ospec +++ b/ospec/bin/ospec @@ -30,7 +30,7 @@ var cwd = process.cwd() if (args.require) { args.require.forEach(function(module) { // eslint-disable-next-line global-require - if (module) require(require.resolve(module, {basedir: cwd})) + if (module) require(require.resolve(module, {paths: [cwd]})) }) }