diff --git a/src/legacy/main/NodeJsHelper.cpp b/src/legacy/main/NodeJsHelper.cpp index 9123590..7ffc193 100644 --- a/src/legacy/main/NodeJsHelper.cpp +++ b/src/legacy/main/NodeJsHelper.cpp @@ -373,7 +373,7 @@ int executeNpmCommand(std::string cmd, std::string workingDir) { MaybeLocal loadenv_ret = node::LoadEnvironment(env, executeJs.c_str()); if (loadenv_ret.IsEmpty()) // There has been a JS exception. throw "error"; - exit_code = node::SpinEventLoop(env).FromMaybe(1); + exit_code = node::SpinEventLoop(env).FromMaybe(0); } catch (...) { lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error( "Fail to execute NPM command. Error occurs" diff --git a/src/lse/PluginManager.cpp b/src/lse/PluginManager.cpp index b910e7f..0cb5837 100644 --- a/src/lse/PluginManager.cpp +++ b/src/lse/PluginManager.cpp @@ -117,12 +117,11 @@ ll::Expected<> PluginManager::load(ll::mod::Manifest manifest) { ) ); if ((exitCode = NodeJsHelper::executeNpmCommand("npm install", ll::string_utils::u8str2str(dirPath.u8string()))) - == 0) - lse::LegacyScriptEngine::getInstance().getSelf().getLogger().info(""_tr()); - else + != 0) { lse::LegacyScriptEngine::getInstance().getSelf().getLogger().error( "Error occurred. Exit code: {code}"_tr(fmt::arg("code", exitCode)) ); + } } #endif if (hasMod(manifest.name)) { diff --git a/tooth.nodejs.json b/tooth.nodejs.json index 63fd822..0129b8a 100644 --- a/tooth.nodejs.json +++ b/tooth.nodejs.json @@ -16,7 +16,7 @@ "github.com/LiteLDev/LegacyParticleAPI": "0.9.x", "github.com/LiteLDev/LegacyMoney": "0.9.x", "gitea.litebds.com/ShrBox/7-zip": "24.x", - "gitea.litebds.com/LiteLDev/node-binaries": "22.12.0-rc.1" + "gitea.litebds.com/LiteLDev/node-binaries": "22.12.0-rc.2" }, "prerequisites": { "github.com/LiteLDev/LeviLamina": "1.0.x"