Fix makelibrary.js to use enviroment variable paths (#4559)

This makes makelibrary.js use environment variables to find paths for plugins, themes and languages instead of just using the paths hardcoded in boot.js
Jermolene-patch-1
jed 2020-04-14 13:03:12 +02:00 zatwierdzone przez GitHub
rodzic 84eaee8210
commit 4146a04a9e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 14 dodań i 3 usunięć

Wyświetl plik

@ -51,9 +51,20 @@ Command.prototype.execute = function() {
}
}
};
collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.pluginsPath));
collectPublisherPlugins(path.resolve($tw.boot.corePath,$tw.config.themesPath));
collectPlugins(path.resolve($tw.boot.corePath,$tw.config.languagesPath));
var pluginsPaths = $tw.getLibraryItemSearchPaths($tw.config.pluginsPath,$tw.config.pluginsEnvVar);
for(var u=0; u<pluginsPaths.length; u++) {
collectPublisherPlugins(pluginsPaths[u]);
}
var themesPaths = $tw.getLibraryItemSearchPaths($tw.config.themesPath,$tw.config.themesEnvVar);
for(var u=0; u<themesPaths.length; u++) {
collectPublisherPlugins(themesPaths[u]);
}
var languagesPaths = $tw.getLibraryItemSearchPaths($tw.config.languagesPath,$tw.config.languagesEnvVar);
for(var u=0; u<languagesPaths.length; u++) {
collectPlugins(languagesPaths[u]);
}
// Save the upgrade library tiddler
var pluginFields = {
title: upgradeLibraryTitle,