feat: added process.electron to get the electron version in forked process (#16450)
This commit is contained in:
parent
8da91523d0
commit
8af532ba98
2 changed files with 18 additions and 0 deletions
|
@ -11,6 +11,7 @@
|
|||
#include "atom/browser/javascript_environment.h"
|
||||
#include "atom/browser/node_debugger.h"
|
||||
#include "atom/common/api/atom_bindings.h"
|
||||
#include "atom/common/atom_version.h"
|
||||
#include "atom/common/crash_reporter/crash_reporter.h"
|
||||
#include "atom/common/native_mate_converters/string16_converter.h"
|
||||
#include "atom/common/node_bindings.h"
|
||||
|
@ -79,6 +80,11 @@ int NodeMain(int argc, char* argv[]) {
|
|||
reporter.SetMethod("start", &crash_reporter::CrashReporter::StartInstance);
|
||||
process.Set("crashReporter", reporter);
|
||||
|
||||
mate::Dictionary versions;
|
||||
if (process.Get("versions", &versions)) {
|
||||
versions.SetReadOnly(ATOM_PROJECT_NAME, ATOM_VERSION_STRING);
|
||||
}
|
||||
|
||||
node::LoadEnvironment(env);
|
||||
|
||||
bool more;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue