Skip to content

Commit

Permalink
Change default path of token file to match the XDG Base Directory Spe…
Browse files Browse the repository at this point in the history
…cification
  • Loading branch information
s-hamann committed Jun 28, 2024
1 parent 4cc9166 commit 23ed5bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ optional arguments:
--token TOKEN API authentication token
--token-file TOKEN_FILE
file containing the API authentication token (default:
$HOME/.desec_auth_token)
$XDG_CONFIG_HOME/desec/token)
--non-blocking When the API's rate limit is reached, return an
appropriate error.
--blocking When the API's rate limit is reached, wait and retry
Expand Down
4 changes: 2 additions & 2 deletions desec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1535,8 +1535,8 @@ def main() -> None:
g.add_argument("--token", help="API authentication token")
g.add_argument(
"--token-file",
default=os.path.join("~", ".desec_auth_token"),
help="file containing the API authentication token (default: %(default)s)",
default=os.path.join(os.environ.get("XDG_CONFIG_HOME", "~/.config"), "desec", "token"),
help="file containing the API authentication token (default: $XDG_CONFIG_HOME/desec/token)",
)

parser.add_argument(
Expand Down

0 comments on commit 23ed5bb

Please sign in to comment.