1 const path = require('path');
3 module.exports = function (opts) {
8 var configPath = opts.configPath;
9 // if a path to the desired config was specified
10 // but no cwd was provided, use configPath dir
11 if (typeof configPath === 'string' && !cwd) {
12 cwd = path.dirname(path.resolve(configPath));
14 if (typeof cwd === 'string') {
15 return path.resolve(cwd);