function resolveCwdRepo()

in src/repoutil.js [434:448]


function resolveCwdRepo () {
    let curPath = apputil.resolveUserSpecifiedPath('.');
    let prevPath;
    for (;;) {
        const value = path.basename(curPath);
        if (getRepoById(value)) {
            return value;
        }
        curPath = path.resolve(curPath, '..');
        if (curPath === prevPath) {
            apputil.fatal('Repo could not be resolved because you are not in a cordova repository.');
        }
        prevPath = curPath;
    }
}