From 99b4a9aa83fd0c6093e0611345c9fd7564b5bbe1 Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sat, 9 May 2015 16:17:28 +0900 Subject: [PATCH] Removing trailing space from process output for default install paths. --- lib/chibi/snow/commands.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/chibi/snow/commands.scm b/lib/chibi/snow/commands.scm index d781a465..980c00f5 100644 --- a/lib/chibi/snow/commands.scm +++ b/lib/chibi/snow/commands.scm @@ -1242,14 +1242,18 @@ (cons share-dir (delete share-dir dirs)) dirs))) ((chicken) - (let ((dir (process->string '(csi -p "(repository-path)")))) + (let ((dir (string-trim + (process->string '(csi -p "(repository-path)")) + char-whitespace?))) (list (if (file-exists? dir) ; repository-path should always exist dir (make-path (or (conf-get cfg 'install-prefix)) "lib" impl 7))))) ((gauche) (list - (let ((dir (process->string '(gauche-config "--sitelibdir")))) + (let ((dir (string-trim + (process->string '(gauche-config "--sitelibdir")) + char-whitespace?))) (or (and (string? dir) (> (string-length dir) 0) (eqv? #\/ (string-ref dir 0)) dir) @@ -1267,9 +1271,11 @@ ((larceny) (list (make-path - (process->string - '(larceny -quiet -nobanner -- -e - "(begin (display (getenv \"LARCENY_ROOT\")) (exit))")) + (string-trim + (process->string + '(larceny -quiet -nobanner -- -e + "(begin (display (getenv \"LARCENY_ROOT\")) (exit))")) + char-whitespace?) "lib/Snow"))) (else (list (make-path (or (conf-get cfg 'install-prefix) "/usr/local")