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) {
190
190
);
191
191
CommandOutput output (CommandOutputType::AllOutput);
192
192
std::string outputStr;
193
+ Local<Object> resObj = Object::newObject ();
193
194
try {
194
195
if (command) {
195
196
command->run (origin, output);
@@ -199,12 +200,12 @@ Local<Value> McClass::runcmdEx(const Arguments& args) {
199
200
if (output.getMessages ().size ()) {
200
201
outputStr.pop_back ();
201
202
}
202
- Local<Object> resObj = Object::newObject ();
203
203
resObj.set (" success" , output.getSuccessCount () ? true : false );
204
204
resObj.set (" output" , outputStr);
205
205
return resObj;
206
206
}
207
- return {};
207
+ resObj.set (" success" , false );
208
+ return resObj;
208
209
}
209
210
CATCH (" Fail in RunCmdEx!" )
210
211
}
You can’t perform that action at this time.
0 commit comments