UNPKG

sui-direct

Version:

Decentralized version control system on SUI blockchain

22 lines (21 loc) 746 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.directVCS = exports.directVCSPath = void 0; const path_1 = require("path"); const child_process_1 = require("child_process"); const extension = process.platform === "win32" ? "exe" : "bin"; exports.directVCSPath = (0, path_1.join)(__dirname, "../..", "bin", `vcs.${extension}`); const directVCS = (command) => { (0, child_process_1.exec)(`${exports.directVCSPath} ${command}`, (error, stdout, stderr) => { if (error) { console.error(error.message); return; } if (stderr) { console.error(stderr); return; } console.log(stdout); }); }; exports.directVCS = directVCS;