Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #115 from atom/boolean-instead-of-number
Browse files Browse the repository at this point in the history
Use Boolean instead of Number in `SpawnAsAdmin` return values
  • Loading branch information
sergiou87 committed Feb 7, 2022
2 parents e82121c + e215b58 commit 0dcecb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ Napi::Value SpawnAsAdmin(const Napi::CallbackInfo& info) {

void *child_process = StartChildProcess(command, args, test_mode);
if (!child_process) {
return Napi::Number::New(env, false);
return Napi::Boolean::New(env, false);
} else {
auto worker = new Worker(info[3].As<Napi::Function>(), child_process, test_mode);
worker->Queue();
return Napi::Number::New(env, true);
return Napi::Boolean::New(env, true);
}
}

Expand Down

0 comments on commit 0dcecb2

Please sign in to comment.