diff --git a/lib/chibi/snow/commands.scm b/lib/chibi/snow/commands.scm index f4ef2aa3..7369c203 100644 --- a/lib/chibi/snow/commands.scm +++ b/lib/chibi/snow/commands.scm @@ -1287,6 +1287,16 @@ (string->number (process->string '(csi -p "(##sys#fudge 42)"))) 8)) +(define (get-chicken-repo-path) + (let ((release (string-trim (process->string '(csi -release)) + char-whitespace?))) + (string-trim + (if (string-prefix? "4." release) + (process->string '(csi -p "(repository-path)")) + (process->string + '(csi -R chicken.platform -p "(car (repository-path))"))) + char-whitespace?))) + (define (get-install-dirs impl cfg) (define (guile-eval expr) (guard (exn (else #f)) @@ -1304,9 +1314,7 @@ (cons share-dir (delete share-dir dirs)) dirs))) ((chicken) - (let ((dir (string-trim - (process->string '(csi -p "(repository-path)")) - char-whitespace?))) + (let ((dir (get-chicken-repo-path))) (list (if (file-exists? dir) ; repository-path should always exist dir