-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Forward restic exit code from resticprofile #410
Comments
Also if you happen to know why I get this line, i would appreciate it. I guess its something with my setup. restic.exe is in the current dir, its not on the path, so it should be executed as ./restic.exe. Possibly its a bug i
|
restic returning different error codes is a new feature actually, resticprofile hasn't caught up yet. I was planning on returning restic codes 👍🏻 About your example using locks, resticprofile can already try to unlock the repository automatically for you, documentation here: https://creativeprojects.github.io/resticprofile/usage/locks/index.html |
I haven't seen this error before, although I'm no longer using a Windows machine. Does the You can try to specify the location of the |
In a PowerShell console, at least, Windows does not execute from the current working directory unless explicitly told to do so with .\some-command.exe.
Windows Terminal defaults to PowerShell unless you have overridden that, and on Windows 11 the right-click on the Start Menu popup defaults to using Windows Terminal.
This may be your issue.
|
Thank you both. Cool to hear its a new restic feature, no wonder you were not forwarding the exit code yet. Fred, regarding locks thank you, I know about it and appreciate that feature greatly. But thank you for the heads up. In this case the other program was running and I was considering adding some error-code handling to my scripts. Btw. I've created powershell wrappers around restic-profile. The powershell scripts are crossplatform so can be used for both windows and linux, and I use it for both, though mostly I think its useful for the task-handling of the windows backups. Hopefully I'll publish it soon. Thank you Daniel, it helped setting the path env, or setting the mentioned restic-binary to full path, that made the warning go away. Indeed in my case, restic was not on the path and I'm using powershell and therefore one had to run ./restic. But it worked for backup, as in resticprofile could find restic and launch the backup, so I was confused about the waning/error. You can close this, if you don't think there's anything else to add or consider about the warning. |
Please, pretty please, forward restic exit code from resticprofile.
I would like to be able to do automation based on exit code from restic. If restic is never called, of cause do as you decide. But if restic is invoked I can do error-handling based on the actual code, possibly choosing between different retry strategies.
Tested on 0.28.1.
The text was updated successfully, but these errors were encountered: