Initial code test
CI/CD Pipeline / test (push) Has been cancelled
CI/CD Pipeline / deploy-internal (push) Has been cancelled

This commit is contained in:
chris committed 2026-08-26 11:51:58 -04:00
commit d4fae15f5c
1696 files changed
+271223

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
import { createRequire } from "node:module";
import { arch, platform } from "node:process";
const require = createRequire(import.meta.url);
/**
* Resolve path to dbmate for the current platform
* */
export function resolveBinary() {
const ext = platform === "win32" ? ".exe" : "";
const path = `@dbmate/${platform}-${arch}/bin/dbmate${ext}`;
try {
return require.resolve(path);
}
catch (err) {
if (err != undefined &&
typeof err === "object" &&
"code" in err &&
err.code === "MODULE_NOT_FOUND") {
throw new Error(`Unable to locate dbmate binary '${path}'`);
}
else {
throw err;
}
}
}
//# sourceMappingURL=resolveBinary.js.map