-
Notifications
You must be signed in to change notification settings - Fork 1.7k
check should create cache directory if it doesn't exist instead of reporting an error #4437
Copy link
Copy link
Closed
Labels
category: checkhelp: good first issueeasy issue to get started with for beginners (both Go and restic)easy issue to get started with for beginners (both Go and restic)help: minor complexityless complex issue, good for beginners that want a little challenge yet not too complicatedless complex issue, good for beginners that want a little challenge yet not too complicatedhelp: wantedtype: bug
Description
Output of restic version
It was 0.15.2, just checked on 0.16.0 - the same:
restic 0.16.0 compiled with go1.20.6 on darwin/amd64
How did you run restic exactly?
TMPDIR=/Volumes/Flash/Temp/restic restic --repo repoPath --password-command 'someCommand' --cache-dir /Volumes/Flash/Temp/Cache/restic/repo check
not critical error received:
unable to create temporary directory for cache during check, disabling cache: stat /Volumes/Flash/Temp/Cache/restic/repo: no such file or directory
What backend/server/service did you use to store the repository?
local
Expected behavior
cache directory will be created and will be used just like in other subcommands
Actual behavior
according to error message: cache is disabled, cache directory is not created
Steps to reproduce the behavior
Run check on any repository with not existent but explicitly specified cache directory via flag
Do you have any idea what may have caused this?
haven't checked the source code in that place but it looks like different subcommands have different handling for the same flags
Do you have an idea how to solve the issue?
If the guess above is right: just isolate flag handling and reuse it
Did restic help you today? Did it make you happy in any way?
Sure, it works great and the issue is not critical at all :)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: checkhelp: good first issueeasy issue to get started with for beginners (both Go and restic)easy issue to get started with for beginners (both Go and restic)help: minor complexityless complex issue, good for beginners that want a little challenge yet not too complicatedless complex issue, good for beginners that want a little challenge yet not too complicatedhelp: wantedtype: bug