Skip to content

Commit cacb396

Browse files
committed
fix: fix system.cmd and system.newProcess callback (#258)
1 parent 5faae47 commit cacb396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/legacy/api/SystemAPI.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ Local<Value> SystemClass::cmd(const Arguments& args) {
103103
return Boolean::newBoolean(NewProcess(
104104
"cmd /c" + cmd,
105105
[callback{std::move(callbackFunc)},
106-
engine{EngineScope::currentEngine()}](int exitCode, std::string output) {
106+
engine{EngineScope::currentEngine()}](int exitCode, std::string output) mutable {
107107
ll::coro::keepThis(
108108
[engine, callback = std::move(callback), exitCode, output = std::move(output)](
109109
) -> ll::coro::CoroTask<> {
@@ -143,7 +143,7 @@ Local<Value> SystemClass::newProcess(const Arguments& args) {
143143
return Boolean::newBoolean(NewProcess(
144144
process,
145145
[callback{std::move(callbackFunc)},
146-
engine{EngineScope::currentEngine()}](int exitCode, std::string output) {
146+
engine{EngineScope::currentEngine()}](int exitCode, std::string output) mutable {
147147
ll::coro::keepThis(
148148
[engine, callback = std::move(callback), exitCode, output = std::move(output)](
149149
) -> ll::coro::CoroTask<> {

0 commit comments

Comments
 (0)