We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fbf843f commit cfabf41Copy full SHA for cfabf41
scripts/generateKeys.ts
@@ -11,13 +11,14 @@ console.log("Generating keys...");
11
const walletKey = generatePrivateKey();
12
const encryptionKeyHex = generateEncryptionKeyHex();
13
14
-const envFilePath = join(__dirname, "../.env");
+const targetDir = process.argv[2] || ".";
15
+const filePath = join(targetDir, ".env");
16
17
await writeFile(
- envFilePath,
18
+ filePath,
19
`WALLET_KEY=${walletKey}
20
ENCRYPTION_KEY=${encryptionKeyHex}
21
`,
22
);
23
-console.log(`Keys written to ${envFilePath}`);
24
+console.log(`Keys written to ${filePath}`);
0 commit comments