[PR #115] [MERGED] Fix snap --dry-run non-zero exit code (v1.21.0) #114

Closed
opened 2026-02-26 17:44:29 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Corsinvest/cv4pve-autosnap/pull/115
Author: @franklupo
Created: 2/20/2026
Status: Merged
Merged: 2/20/2026
Merged by: @franklupo

Base: masterHead: fix/dry-run-non-zero-exit-code


📝 Commits (1)

  • d084eec Fix snap --dry-run non-zero exit code and update packages to 9.1.4 (#114)

📊 Changes

3 files changed (+5 additions, -4 deletions)

View changed files

📝 Directory.Build.props (+1 -1)
📝 Directory.Packages.props (+2 -2)
📝 src/Corsinvest.ProxmoxVE.AutoSnap.Api/Application.cs (+2 -1)

📄 Description

Closes #114

Summary

  • inError was initialized to true and never reset when _dryRun skipped the snapshot creation block, causing snap --dry-run to always report failure
  • Changed initialization to false (consistent with SnapshotsRemoveAsync) and added explicit inError = true in the catch block
  • Updated NuGet packages Corsinvest.ProxmoxVE.Api.Extension and Corsinvest.ProxmoxVE.Api.Console from 9.1.09.1.4
  • Bump version 1.20.01.21.0

Test plan

  • Run snap --dry-run and verify exit code is 0
  • Run snap (no dry-run) with a real error and verify exit code is non-zero
  • Run clean --dry-run and verify it still works correctly

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Corsinvest/cv4pve-autosnap/pull/115 **Author:** [@franklupo](https://github.com/franklupo) **Created:** 2/20/2026 **Status:** ✅ Merged **Merged:** 2/20/2026 **Merged by:** [@franklupo](https://github.com/franklupo) **Base:** `master` ← **Head:** `fix/dry-run-non-zero-exit-code` --- ### 📝 Commits (1) - [`d084eec`](https://github.com/Corsinvest/cv4pve-autosnap/commit/d084eecf3ac699345858c4dd2c1688d6fe3f54b0) Fix snap --dry-run non-zero exit code and update packages to 9.1.4 (#114) ### 📊 Changes **3 files changed** (+5 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `Directory.Build.props` (+1 -1) 📝 `Directory.Packages.props` (+2 -2) 📝 `src/Corsinvest.ProxmoxVE.AutoSnap.Api/Application.cs` (+2 -1) </details> ### 📄 Description Closes #114 ## Summary - `inError` was initialized to `true` and never reset when `_dryRun` skipped the snapshot creation block, causing `snap --dry-run` to always report failure - Changed initialization to `false` (consistent with `SnapshotsRemoveAsync`) and added explicit `inError = true` in the `catch` block - Updated NuGet packages `Corsinvest.ProxmoxVE.Api.Extension` and `Corsinvest.ProxmoxVE.Api.Console` from `9.1.0` → `9.1.4` - Bump version `1.20.0` → `1.21.0` ## Test plan - [ ] Run `snap --dry-run` and verify exit code is 0 - [ ] Run `snap` (no dry-run) with a real error and verify exit code is non-zero - [ ] Run `clean --dry-run` and verify it still works correctly --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 17:44:29 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cv4pve-autosnap#114
No description provided.