build: remove enable_run_as_node build flag (#38413)

* feat: remove enable_run_as_node flag

* drop features.isRunAsNodeEnabled()

* use IsEnvSet() helper in electron_main_linux.cc

* cleanup [[maybe_unused]]

---------

Co-authored-by: Milan Burda <miburda@microsoft.com>
This commit is contained in:
Milan Burda 2023-06-08 22:40:08 +02:00 committed by GitHub
parent 806f00285c
commit 05d39d8313
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 29 additions and 96 deletions

View file

@ -28,7 +28,7 @@ void abort_report_np(const char* fmt, ...);
namespace {
[[maybe_unused]] bool IsEnvSet(const char* name) {
bool IsEnvSet(const char* name) {
char* indicator = getenv(name);
return indicator && indicator[0] != '\0';
}
@ -53,12 +53,10 @@ int main(int argc, char* argv[]) {
partition_alloc::EarlyMallocZoneRegistration();
FixStdioStreams();
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
if (electron::fuses::IsRunAsNodeEnabled() &&
IsEnvSet("ELECTRON_RUN_AS_NODE")) {
return ElectronInitializeICUandStartNode(argc, argv);
}
#endif
#if defined(HELPER_EXECUTABLE) && !IS_MAS_BUILD()
uint32_t exec_path_size = 0;