MCPcopy Create free account
hub / github.com/modem-dev/hunk / commandDirectory

Function commandDirectory

scripts/smoke-prebuilt-install.ts:62–64  ·  view source on GitHub ↗

Resolve a command directory for a sanitized PATH that still works cross-platform.

(command: string)

Source from the content-addressed store, hash-verified

60
61/** Resolve a command directory for a sanitized PATH that still works cross-platform. */
62function commandDirectory(command: string) {
63 return path.dirname(commandPath(command));
64}
65
66const repoRoot = path.resolve(import.meta.dir, "..");
67const packageVersion = JSON.parse(await Bun.file(path.join(repoRoot, "package.json")).text())

Callers 1

Calls 1

commandPathFunction · 0.85

Tested by

no test coverage detected