1 | const findDominantFile = require('find-dominant-file');
|
2 |
|
3 | const 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 |
|
11 | module.exports = getWorkingDirectory;
|