This commit is contained in:
Stephen Franceschelli
2019-07-15 13:46:13 -04:00
parent 574f83ab4c
commit 70039febf8
7043 changed files with 0 additions and 1866383 deletions

View File

@@ -1,26 +0,0 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const slash_1 = __importDefault(require("slash"));
const execa_1 = __importDefault(require("execa"));
function default_1() {
try {
const { stdout } = execa_1.default.sync('git', [
'rev-parse',
'--show-toplevel',
'--git-common-dir'
]);
const [topLevel, gitDir] = stdout
.trim()
.split('\n')
// Normalize for Windows
.map(slash_1.default);
return { topLevel, gitDir };
}
catch (error) {
throw new Error(error.stderr);
}
}
exports.default = default_1;