Skip to content

Commit

Permalink
test: update config.ts to dynamically set the lib path based on the p…
Browse files Browse the repository at this point in the history
…latform
  • Loading branch information
microshine committed Jan 30, 2024
1 parent decde63 commit 0c13e7c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
import * as os from "node:os";

let lib = "/usr/local/lib/softhsm/libsofthsm2.so";
switch (os.platform()) {
case "darwin":
lib = "/usr/local/lib/softhsm/libsofthsm2.dylib";
break;
case "linux":
lib = "/usr/lib/softhsm/libsofthsm2.so";
break;
default:
throw new Error("Unknown platform");
}

export default {
init: {
lib: "/usr/local/lib/softhsm/libsofthsm2.so",
lib,
libName: "SoftHSM",
pin: "12345",
vendor: "",
Expand Down

0 comments on commit 0c13e7c

Please sign in to comment.