test: add spec for --require filtering in NODE_OPTIONS (#29508)

This commit is contained in:
Milan Burda
2021-06-03 07:43:28 +02:00
committed by GitHub
parent 6ab2684234
commit 7a11390b8a
3 changed files with 28 additions and 0 deletions

View File

@@ -131,6 +131,10 @@ void stop_and_close_uv_loop(uv_loop_t* loop) {
bool g_is_initialized = false;
bool IsPackagedApp() {
auto env = base::Environment::Create();
if (env->HasVar("ELECTRON_FORCE_IS_PACKAGED"))
return true;
base::FilePath exe_path;
base::PathService::Get(base::FILE_EXE, &exe_path);
base::FilePath::StringType base_name =