src/cordova/util.js
function cdProjectRoot(dir) {
    var projectRoot = this.isCordova(dir);
    if (!projectRoot) {
        throw new CordovaError('Current working directory is not a judpack project.');
    }
    if (!origCwd) {
        origCwd = process.env.PWD || process.cwd();
    }
    process.env.PWD = projectRoot;
    process.chdir(projectRoot);
    return projectRoot;
}
function cdProjectRoot(dir) {
    var projectRoot = this.isCordova(dir);
    if (!projectRoot) {
        throw new CordovaError('Current working directory is not a judpack project.');
    }
    if (!origCwd) {
        origCwd = process.env.PWD || process.cwd();
    }
    process.env.PWD = projectRoot;
    process.chdir(projectRoot);
    return projectRoot;
}
function cdProjectRoot ( dir ) { var projectRoot = this . isCordova ( dir ) ; if ( ! projectRoot ) { throw new CordovaError ( 'Current working directory is not a judpack project.' ) ; } if ( ! origCwd ) { origCwd = process . env . PWD || process . cwd ( ) ; } process . env . PWD = projectRoot ; process . chdir ( projectRoot ) ; return projectRoot ; }
Cd to project root dir and return its path. Throw CordovaError if not in a Corodva project.
Cd to project root dir and return its path . Throw CordovaError if not in a Corodva project .