From aeeaa42b464b66d34eb8d41a9d121ce521951ac3 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 31 Jan 2008 13:39:16 -0200 Subject: [PATCH] Fix #567. lilypond-invoke-editor.scm: only change LD_LIBRARY_PATH if it is set. --- scripts/lilypond-invoke-editor.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/lilypond-invoke-editor.scm b/scripts/lilypond-invoke-editor.scm index e03a2afe0c..d847be27e9 100644 --- a/scripts/lilypond-invoke-editor.scm +++ b/scripts/lilypond-invoke-editor.scm @@ -127,15 +127,16 @@ Options: (define (strip-framework-path var) (define pat "lilypond/usr") - (let* - ((val (getenv var)) - (paths (string-split val #\:)) - (without (remove (lambda (s) (string-contains s pat)) - paths))) - - (if (not (= (length without) - (length paths))) - (setenv var (string-join without ":"))))) + (if (getenv var) + (let* + ((val (getenv var)) + (paths (string-split val #\:)) + (without (remove (lambda (s) (string-contains s pat)) + paths))) + + (if (not (= (length without) + (length paths))) + (setenv var (string-join without ":")))))) (define (main args) (let ((files (parse-options args))) -- 2.39.2