Extend SnapshotOptions w/ command data

In order to determine whether to save a snapshot, we need to capture the exit code returned by a command. In order to provide a nice error message, we supply stderr as well.

Signed-off-by: Sebastian Hoß <seb@xn--ho-hia.de>
This commit is contained in:
Sebastian Hoß authored and Michael Eischer committed 2023-10-27 23:58:51 +02:00
1 parent a2b76ff34f
commit 25350a9c55
2 files changed
+6

No files matched your search

+2
View File
@@ -676,6 +676,8 @@ func runBackup(ctx context.Context, opts BackupOptions, gopts GlobalOptions, ter
Hostname: opts.Host,
ParentSnapshot: parentSnapshot,
ProgramVersion: "restic " + version,
Command: command,
CommandStderr: stderr,
}
if !gopts.JSON {