🩹 look for bedrock credentials in homedir
This commit is contained in:
parent
84fe459fe9
commit
37b21f4876
1 changed files with 2 additions and 1 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import * as fs from "fs";
|
||||
import os from "os";
|
||||
import { join as joinPath } from "path";
|
||||
import { promisify } from "util";
|
||||
import { BaseLLM } from "..";
|
||||
|
|
@ -143,7 +144,7 @@ class Bedrock extends BaseLLM {
|
|||
|
||||
try {
|
||||
const data = await readFile(
|
||||
joinPath(process.env.HOME!, ".aws", "credentials"),
|
||||
joinPath(process.env.HOME ?? os.homedir(), ".aws", "credentials"),
|
||||
"utf8",
|
||||
);
|
||||
const credentials = this._parseCredentialsFile(data);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue