packages/okam-cli/src/utils/index.js
function getGitUser() {
    try {
        let name = execSync('git config --get user.name');
        let email = execSync('git config --get user.email');
        name = name && name.toString().trim();
        email = email && ('<' + email.toString().trim() + '>');
        return (name || '') + (email || '');
    }
    catch (e) {
        return '';
    }
}
function getGitUser() {
    try {
        let name = execSync('git config --get user.name');
        let email = execSync('git config --get user.email');
        name = name && name.toString().trim();
        email = email && ('<' + email.toString().trim() + '>');
        return (name || '') + (email || '');
    }
    catch (e) {
        return '';
    }
}
function getGitUser ( ) { try { let name = execSync ( 'git config --get user.name' ) ; let email = execSync ( 'git config --get user.email' ) ; name = name && name . toString ( ) . trim ( ) ; email = email && ( '<' + email . toString ( ) . trim ( ) + '>' ) ; return ( name || '' ) + ( email || '' ) ; } catch ( e ) { return '' ; } }
获取 git 用户名

@return {string}
获取 git 用户名