File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,7 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
190190 );
191191 CommandOutput output (CommandOutputType::AllOutput);
192192 std::string outputStr;
193+ Local<Object> resObj = Object::newObject ();
193194 try {
194195 if (command) {
195196 command->run (origin, output);
@@ -199,12 +200,12 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
199200 if (output.getMessages ().size ()) {
200201 outputStr.pop_back ();
201202 }
202- Local<Object> resObj = Object::newObject ();
203203 resObj.set (" success" , output.getSuccessCount () ? true : false );
204204 resObj.set (" output" , outputStr);
205205 return resObj;
206206 }
207- return {};
207+ resObj.set (" success" , false );
208+ return resObj;
208209 }
209210 CATCH (" Fail in RunCmdEx!" )
210211}
You can’t perform that action at this time.
0 commit comments