Fix ospec --require with relative paths (#2511)
This commit is contained in:
parent
d3826c38eb
commit
bcf427a3be
2 changed files with 3 additions and 1 deletions
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
### Upcoming...
|
||||
|
||||
- Fix `ospec require` with relative paths
|
||||
|
||||
-->
|
||||
|
||||
### v2.0.3
|
||||
|
|
|
|||
|
|
@ -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]}))
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue