UNPKG

@brimdata/zealot

Version:

The Javascript Client for Zed Lakes

15 lines (12 loc) 371 B
import path from "path" import os from "os" export function getPath(name: string) { if (os.platform() === "win32") name += ".exe" let dir = "../../../../node_modules/zed/dist" if (isBuilt()) dir = "../" + dir return path.join(__dirname, dir, name) } function isBuilt() { const buildDir = path.normalize("dist/cjs/cmd") return __dirname.endsWith(buildDir) }