Skip to content

Commit e4e2007

Browse files
committed
fix: 수정된 API 키 파일 경로 및 오류 메시지 개선
1 parent bf760c9 commit e4e2007

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

commitgen/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import yaml
44

55
def load_api_key():
6-
path = os.path.join(os.getcwd(), ".api_keys", "openai.json")
6+
path = os.path.join(os.path.expanduser("~/.api_keys"), "openai.json")
77
if not os.path.exists(path):
8-
raise FileNotFoundError("❌ API key file not found: .api_keys/openai.json")
8+
raise FileNotFoundError(f"❌ API key file not found: {path}")
99
with open(path, "r") as f:
1010
data = json.load(f)
1111
return data["api_key"]
@@ -16,4 +16,4 @@ def load_prompt_template(path: str = './prompt_template.yml'):
1616
raise FileNotFoundError(f"❌ Prompt template not found: {path}")
1717
with open(path, "r", encoding='utf-8') as f:
1818
config = yaml.safe_load(f)
19-
return config['commit_format'], config['commit_type']
19+
return config['commit_format'], config['commit_type']

0 commit comments

Comments
 (0)