From 14b93c5ff3f25933e2f27382a8477174bb7fdf76 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 15 Feb 2022 16:08:32 +0100 Subject: [PATCH] run: handle empty create_tar_from_depot_binaries This patch works around 'tar' erroring out when faced with an empty list of files: tar: Cowardly refusing to create an empty archive This can happen when using sculpt.run for a scenario with only a runtime but no deploy or launcher configuration. Issue #4369 --- tool/run/depot.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tool/run/depot.inc b/tool/run/depot.inc index 59ec4b4023..9477e2a298 100644 --- a/tool/run/depot.inc +++ b/tool/run/depot.inc @@ -343,7 +343,11 @@ proc create_tar_from_depot_binaries { archive_path args } { check_for_missing_depot_archives - eval "exec tar cf $archive_path -C [depot_dir] [lsort -unique $content]" + if {[llength $args] > 0} { + eval "exec tar cf $archive_path -C [depot_dir] [lsort -unique $content]" + } else { + eval "exec tar cf $archive_path -T /dev/null" + } }