mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-14 02:27:49 +01:00
fix: closes #11606, detect musl and use sass instead
This commit is contained in:
14
src/utils.js
14
src/utils.js
@@ -42,7 +42,19 @@ utils.secureRandom = function (low, high) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
utils.getSass = function () {
|
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');
|
return require('sass');
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user