From 5b6e4a5ea82af92512405f9567ecff3f62aba677 Mon Sep 17 00:00:00 2001 From: retropikzel Date: Sun, 11 Jan 2026 10:01:09 +0200 Subject: [PATCH] Fix handling of empty dependencies. Ask before installing and show what is to be installed --- lib/chibi/snow/commands.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/chibi/snow/commands.scm b/lib/chibi/snow/commands.scm index 221c8f27..970a81f9 100644 --- a/lib/chibi/snow/commands.scm +++ b/lib/chibi/snow/commands.scm @@ -639,10 +639,18 @@ (close-output-port out)))) (define (command/install-dependencies cfg spec scm-file) - (apply command/install - `(,cfg ,spec - ,@(map write-to-string - (cdar (extract-program-dependencies scm-file)))))) + (let ((dependencies (extract-program-dependencies scm-file))) + (cond ((null? dependencies) + (display "Could not get program dependencies, or program has no snow dependencies.") + (newline)) + ((yes-or-no? cfg + "Found dependencies: " + (cdar dependencies) + #\newline + "Install") + (apply command/install + `(,cfg ,spec + ,@(map write-to-string (cdar dependencies)))))))) (define (command/srfi-list cfg spec) (let ((implementations (conf-get cfg 'implementations)))