Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Fix mage mise-diagnosis (#71012)

Chris Truterb215b0ff3de2
diff --git a/mage/src/mage/doctor.clj b/mage/src/mage/doctor.clj
index 7c5a4d1999a..4d76f7cf201 100644
--- a/mage/src/mage/doctor.clj
+++ b/mage/src/mage/doctor.clj
@@ -124,7 +124,11 @@
(if-not (can-run? "mise")
{:installed? false}
(let [doctor-json (try
- (some-> (sh "mise" "doctor" "--json")
+ ;; `mise doctor` has a non-zero exit code when there are pending installs,
+ ;; but still produces valid JSON on stdout — but `sh` requires exit 0.
+ (some-> @(p/process {:out :string, :err :string, :dir u/project-root-directory}
+ "mise" "doctor" "--json")
+ :out str/trim not-empty
json/read-str)
(catch Exception _ nil))
config-json (try