Ensure sass errors printed visably in red

Also include the standard output as it frequently includes crucial
information in narrowing down where errors lie in SASS files
This commit is contained in:
William Roe 2015-02-21 22:07:41 +00:00
parent 7595cbcf70
commit 0c7743e605

View file

@ -1,6 +1,7 @@
(ns cryogen-core.sass (ns cryogen-core.sass
(:require [clojure.java.shell :as shell] (:require [clojure.java.shell :as shell]
[clojure.java.io :as io] [clojure.java.io :as io]
[text-decoration.core :refer :all]
[cryogen-core.io :refer [ignore match-re-filter]])) [cryogen-core.io :refer [ignore match-re-filter]]))
(defmacro sh (defmacro sh
@ -63,7 +64,8 @@ the command. Shows you any problems it comes across when compiling. "
;; no problems in sass compilation ;; no problems in sass compilation
(println "Successfully compiled:" a-file) (println "Successfully compiled:" a-file)
;; else I show the error ;; else I show the error
(println (:err result)))))) (println (red (:err result))
(red (:out result)))))))
;; Else I prompt to install Sass ;; Else I prompt to install Sass
(println "Sass seems not to be installed, but you have scss / sass files in " (println "Sass seems not to be installed, but you have scss / sass files in "
src-sass src-sass