<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.10
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/c4bdaef9c7ea369b2f97c8869154d6ef774af548">https://github.com/macports/macports-base/commit/c4bdaef9c7ea369b2f97c8869154d6ef774af548</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit c4bdaef9c7ea369b2f97c8869154d6ef774af548
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Mon Jul 22 10:58:05 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> snapshot::main: ensure correct return codes
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 2f9d11fba61d888cb39128c3680971f53092431c)
</span>---
src/macports1.0/snapshot.tcl | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/snapshot.tcl b/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 317f50444..ef119b6b7 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/snapshot.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -70,7 +70,11 @@ namespace eval snapshot {
</span>
switch $operation {
"create" {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- return [create $opts]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[catch {create $opts} result]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ui_error "Failed to create snapshot: $result"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span> }
"list" {
set snapshots [registry::snapshot get_all]
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -162,6 +166,7 @@ namespace eval snapshot {
</span> }
ui_msg [string trimright $note "\n"]
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ return 0
</span> }
"delete" {
return [delete_snapshot $opts]
</pre><pre style='margin:0'>
</pre>