Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix empty ADDED_SIZE env for restic>=0.14.0 #284

Merged
merged 1 commit into from
Jan 18, 2023

Conversation

11mariom
Copy link
Contributor

Since version 0.14.0 restic changed string for summary of backup, current version:

	b.P("%s to the repository: %-5s (%-5s stored)\n", verb,
		ui.FormatBytes(summary.ItemStats.DataSize+summary.ItemStats.TreeSize),
		ui.FormatBytes(summary.ItemStats.DataSizeInRepo+summary.ItemStats.TreeSizeInRepo))

https://github.com/restic/restic/blob/master/internal/ui/backup/text.go#L137-L139

old version (prior 0.13.1):

	b.P("%s to the repo: %-5s\n", verb, formatBytes(summary.ItemStats.DataSize+summary.ItemStats.TreeSize))

https://github.com/restic/restic/blob/v0.13.1/internal/ui/backup/text.go#L181

This MR is fixing issue of empty AUTORESTIC_ADDED_SIZE env variables for new restic versions and should work for old ones as well.
regex101

@vercel
Copy link

vercel bot commented Jan 18, 2023

Someone is attempting to deploy a commit to a Personal Account owned by @cupcakearmy on Vercel.

@cupcakearmy first needs to authorize it.

@cupcakearmy cupcakearmy merged commit 1512db5 into cupcakearmy:master Jan 18, 2023
@cupcakearmy
Copy link
Owner

Thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants