internals/setup.js
/**
 * Checks if we are under Git version control
 * @returns {Promise<boolean>}
 */
Checks if we are under Git version control
@returns {Promise}
Checks if we are under Git version control @returns { Promise }
async function hasGitRepository() {
  const { stdout } = await exec('git status')
  const regex = new RegExp(/fatal:\s+Not\s+a\s+git\s+repository/, 'i')
  return !regex.test(stdout)
}
async function hasGitRepository ( ) { const { stdout } = await exec ( 'git status' ) const regex = new RegExp ( / fatal:\s+Not\s+a\s+git\s+repository / , 'i' ) return ! regex . test ( stdout ) }
Checks if we are under Git version control
 @returns {Promise<boolean>}
Checks if we are under Git version control @returns { Promise<boolean > }