global: reject empty repository location files (#22052)

Return a fatal error before opening or creating a repository when its location file is empty after decoding and trimming whitespace.
This commit is contained in:
JUSHUANGHUI LI authored and GitHub committed 2026-11-15 19:03:50 +00:00
1 parent 335d7e38aa
commit d7aa4145e0
4 files changed
+35 -1

No files matched your search

+2 -1
View File
@@ -30,7 +30,8 @@ section here.
For automated backups, restic supports specifying the repository location in the
environment variable ``RESTIC_REPOSITORY``. Restic can also read the repository
location from a file specified via the ``--repository-file`` option or the
environment variable ``RESTIC_REPOSITORY_FILE``.
environment variable ``RESTIC_REPOSITORY_FILE``. The file must contain a
repository location; empty or whitespace-only files are rejected.
For automating the supply of the repository password to restic, several options
exist: