UNPKG

@brimdata/zealot

Version:

The Javascript Client for Zed Lakes

26 lines (25 loc) 773 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "getPath", { enumerable: true, get: ()=>getPath }); const _path = /*#__PURE__*/ _interopRequireDefault(require("path")); const _os = /*#__PURE__*/ _interopRequireDefault(require("os")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function getPath(name) { if (_os.default.platform() === "win32") name += ".exe"; let dir = "../../../../node_modules/zed/dist"; if (isBuilt()) dir = "../" + dir; return _path.default.join(__dirname, dir, name); } function isBuilt() { const buildDir = _path.default.normalize("dist/cjs/cmd"); return __dirname.endsWith(buildDir); }