lib/utils.js
function checkGitRepoExistence() {
        return new Promise(function(resolve, reject) {
            var checkRepoCommand = childProcess.exec('git branch');

            checkRepoCommand.stderr.on('data', function(err) {
                reject(err);
            });

            checkRepoCommand.on('close', function(code) {
                if (code === 0) { //0 means ok, 128 means error
                    resolve();
                }
            });
        });
    }
function checkGitRepoExistence() {
        return new Promise(function(resolve, reject) {
            var checkRepoCommand = childProcess.exec('git branch');

            checkRepoCommand.stderr.on('data', function(err) {
                reject(err);
            });

            checkRepoCommand.on('close', function(code) {
                if (code === 0) { //0 means ok, 128 means error
                    resolve();
                }
            });
        });
    }
function checkGitRepoExistence ( ) { return new Promise ( function ( resolve , reject ) { var checkRepoCommand = childProcess . exec ( 'git branch' ) ; checkRepoCommand . stderr . on ( 'data' , function ( err ) { reject ( err ) ; } ) ; checkRepoCommand . on ( 'close' , function ( code ) { if ( code === 0 ) { //0 means ok, 128 means error resolve ( ) ; } } ) ; } ) ; }
Exec git branch to check if exist .git files
Exec git branch to check if exist . git files