Skip to content

Node.js based forum software built for the modern web

fix: closes #11606, detect musl and use sass instead

Barış Soner Uşaklı442f9f1d5bc6
diff --git a/src/utils.js b/src/utils.js
index 55d3b5e793..abc7a92e2a 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -42,7 +42,19 @@ utils.secureRandom = function (low, high) {
};
utils.getSass = function () {
- if (process.platform === 'freebsd') {
+ // https://github.com/NodeBB/NodeBB/issues/11606
+ function isMusl() {
+ if (process.platform !== 'linux') {
+ return false;
+ }
+
+ try {
+ return !process.report.getReport().header.glibcVersionRuntime;
+ } catch {
+ return true;
+ }
+ }
+ if (process.platform === 'freebsd' || isMusl()) {
return require('sass');
}
try {