Skip to content

Commit d8e0904

Browse files
committed
chore: remove useless code
1 parent 5273ecb commit d8e0904

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

src/legacy/main/Global.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,3 @@ constexpr wchar_t LLSE_GLOBAL_DATA_NAME[] = L"LLSE_GLOBAL_
9393
constexpr unsigned long LLSE_MESSAGE_SYSTEM_WAIT_CHECK_INTERVAL = 5;
9494
constexpr size_t LLSE_POOL_THREAD_COUNT = 4;
9595
constexpr int LLSE_VALID_BACKENDS_COUNT = 4;
96-
constexpr auto LLSE_NPM_EXECUTE_PATH = "plugins/legacy-script-engine-nodejs";

src/legacy/main/NodeJsHelper.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -435,18 +435,18 @@ int executeNpmCommand(const std::string& cmd, std::string workingDir) {
435435

436436
std::string executeJs = fmt::format(
437437
R"(
438-
const engineDir = "{0}";
439-
const workingDir = "{1}";
440-
const command = "{2}";
441-
const oldCwd = process.cwd();
442-
const publicRequire = require("module").createRequire(
443-
require("path").resolve(engineDir) + require("path").sep
444-
);
445-
process.chdir(workingDir);
446-
publicRequire("npm-js-interface")(command);
447-
process.chdir(oldCwd);
438+
const engineDir = "{0}";
439+
const workingDir = "{1}";
440+
const command = "{2}";
441+
const oldCwd = process.cwd();
442+
const publicRequire = require("module").createRequire(
443+
require("path").resolve(engineDir) + require("path").sep
444+
);
445+
process.chdir(workingDir);
446+
publicRequire("npm-js-interface")(command);
447+
process.chdir(oldCwd);
448448
)",
449-
engineDir.erase(0,2)+"/",
449+
engineDir,
450450
workingDir,
451451
cmd
452452
);

0 commit comments

Comments
 (0)