UNPKG

rush-init-project-plugin

Version:

Rush plugin for initialize project in monorepo

23 lines 761 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getGitUserName = void 0; var node_core_library_1 = require("@rushstack/node-core-library"); var getGitUserName = function (cwd) { var _a, _b; try { var result = node_core_library_1.Executable.spawnSync('git', ['config', 'user.name'], { currentWorkingDirectory: cwd, stdio: "pipe", }); if (result.status !== 0) { return ''; } return (_b = (_a = result.stdout) === null || _a === void 0 ? void 0 : _a.trim()) !== null && _b !== void 0 ? _b : ''; } catch (e) { // no-catch return ''; } }; exports.getGitUserName = getGitUserName; //# sourceMappingURL=GitConfig.js.map