Skip to content

Commit e251135

Browse files
committed
Allow specifying URL via envvar update token envvar name
1 parent 4626bbb commit e251135

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ctfcli/core/config.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111

1212
class Config:
1313
_env_vars = {
14-
"CTFD_TOKEN": "access_token",
14+
"CTFCLI_ACCESS_TOKEN": "access_token",
15+
"CTFCLI_URL": "url",
1516
}
1617

1718
def __init__(self):

ctfcli/core/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
class MissingAPIKey(Exception):
77
def __str__(self):
88
return (
9-
"Missing API key. Please set the API key in your configuration file or set CTFD_TOKEN environment variable."
9+
"Missing API key. Please set the API key in your configuration file or set CTFCLI_ACCESS_TOKEN environment variable."
1010
)
1111

1212

0 commit comments

Comments
 (0)