mirror of
https://github.com/Corsinvest/cv4pve-autosnap.git
synced 2026-04-25 00:45:56 +03:00
[GH-ISSUE #114] [BUG] snap --dry-run non-zero return code #97
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/cv4pve-autosnap#97
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @tlapik123 on GitHub (Feb 20, 2026).
Original GitHub issue: https://github.com/Corsinvest/cv4pve-autosnap/issues/114
What happened?
Hi!
When I run autosnap is with
--dry-runinsnapmode I get non-zero exit code. - When I runcleancommand it works as expected.I suspect that the problem is here:
github.com/Corsinvest/cv4pve-autosnap@9fadfabd83/src/Corsinvest.ProxmoxVE.AutoSnap.Api/Application.cs (L378)The
cleancommand hasfalsethere, but maybe there is some deeper reason for true, that I'm not getting. (Its nice to have "fail by default" path tho.)I hope this isn't just my wrong usage of script. 🙏
Expected behavior
Have zero exit code when everything goes OK or error message when not.
Command used
Log output
cv4pve-autosnap Version
v1.20.0
Proxmox VE Version
7.2-11 and 8.4.14
Last working version
Did test v1.20 and 1.19 - both didn't work.
Operating System
Linux
Pull Request
@franklupo commented on GitHub (Feb 20, 2026):
Thank you for reporting this issue and for the detailed log! 🙏
The bug has been fixed in v1.21.0:
inErrorwas incorrectly initialized totrueand never reset when--dry-runskipped the snapshot creation blockfalseas default (consistent withSnapshotsRemoveAsync) with explicitinError = truein thecatchblockThe fix is available in the v1.21.0 release.
@tlapik123 commented on GitHub (Feb 21, 2026):
Thank you very much for such a quick fix! 💙
Sidenote - I actually like the "fail by default" approach, but I get why here its more trouble than worth 🚀