UNPKG

ut-tools

Version:

Build and Release management automation package.

16 lines (12 loc) 349 B
'use strict'; const gitconfig = require('gitconfiglocal'); const pify = require('pify'); module.exports = dir => { return pify(gitconfig)(dir || process.cwd()).then(config => { var url = config.remote && config.remote.origin && config.remote.origin.url; if (!url) { throw new Error('Couldn\'t find origin url'); } return url; }); };