UNPKG

296 BJavaScriptView Raw
1const findDominantFile = require('find-dominant-file');
2
3const getWorkingDirectory = (app, command) => {
4 let wd = process.cwd();
5 if (command.executeInProjectRootDirectory) {
6 wd = findDominantFile(wd, 'package.json', true) || wd;
7 }
8 return wd;
9};
10
11module.exports = getWorkingDirectory;