From 7fb702a0d9fcb302ae4bdb8013fe2847bfe1159e Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 11 Nov 2024 15:26:06 +0100 Subject: [PATCH] tool/run: exit gracefully if depot/create failed With --depot-auto-update enabled, the run tool calls the depot/create tool, which in principle may fail. In this case, print a diagnostic info instead of a backtrace. Issue #5379 --- tool/run/depot.inc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tool/run/depot.inc b/tool/run/depot.inc index a1ed8974d3..9658a29d93 100644 --- a/tool/run/depot.inc +++ b/tool/run/depot.inc @@ -233,7 +233,10 @@ proc _depot_auto_update { archives } { puts "update depot: $cmd" - exec {*}$cmd >@ stdout 2>@ stderr + if {[catch {exec {*}$cmd >@ stdout 2>@ stderr}]} { + puts stderr "\nError: tool/depot/create during depot-auto-update failed\n" + exit 1 + } }