Version: 0.0.10.0.30.0.40.0.50.0.110.1.00.1.10.1.20.2.00.2.10.2.20.3.00.3.10.3.20.4.00.4.10.5.00.5.10.6.00.6.10.6.20.7.00.8.00.8.10.9.00.10.00.10.10.10.20.11.00.12.00.12.10.12.20.13.00.14.01.0.01.1.01.1.11.1.21.1.31.1.41.2.01.2.11.3.01.4.01.5.01.6.01.7.01.7.11.8.01.8.11.9.01.9.11.9.21.10.01.11.01.11.11.12.01.13.01.13.11.13.21.13.31.13.41.13.51.13.61.13.71.14.01.15.01.15.11.16.01.17.01.17.11.17.21.18.01.19.01.20.01.20.11.21.01.22.01.22.11.23.01.23.12.0.02.0.12.0.22.1.02.2.02.3.02.4.02.4.12.4.22.4.32.4.42.4.52.4.62.4.72.4.82.4.92.4.102.4.112.4.12
var exec = require('./exec')
function getGitRootFolder (cb) {
return exec('git rev-parse --show-toplevel').then(
function (path) {
path = path.trim()
if (cb) {
cb(null, path)
}
return path
},
function (err) {
cb(err)
} else {
throw err
)
module.exports = getGitRootFolder