From fc1d1d725c2e6290f586a253bddcd35d26ac84c2 Mon Sep 17 00:00:00 2001 From: Ben Swift Date: Fri, 2 Dec 2016 11:55:47 +1100 Subject: [PATCH] bugfix for compass-installed? catch the (previously uncaught) exception when there isn't a `compass` binary on the `$PATH`, return `false` instead --- src/cryogen_core/sass.clj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cryogen_core/sass.clj b/src/cryogen_core/sass.clj index 6e4d8c8..4ddb7cd 100644 --- a/src/cryogen_core/sass.clj +++ b/src/cryogen_core/sass.clj @@ -15,9 +15,12 @@ (= 0 (:exit (sh "sass" "--version")))) (defn compass-installed? - "Checks for the installation of Compass." - [] - (= 0 (:exit (sh "compass" "--version")))) + "Checks for the installation of Compass." + [] + (try + (= 0 (:exit (sh "compass" "--version"))) + (catch java.io.IOException _ + false))) (defn find-sass-files "Given a Diretory, gets files, Filtered to those having scss or sass