@@ -78,6 +78,7 @@ static void PrintJavaScriptErrorProperties(JSONWriter* writer,
78
78
static void PrintNativeStack (JSONWriter* writer);
79
79
static void PrintResourceUsage (JSONWriter* writer);
80
80
static void PrintGCStatistics (JSONWriter* writer, Isolate* isolate);
81
+ static void PrintEnvironmentVariables (JSONWriter* writer);
81
82
static void PrintSystemInformation (JSONWriter* writer);
82
83
static void PrintLoadedLibraries (JSONWriter* writer);
83
84
static void PrintComponentVersions (JSONWriter* writer);
@@ -249,6 +250,9 @@ static void WriteNodeReport(Isolate* isolate,
249
250
writer.json_arrayend ();
250
251
251
252
// Report operating system information
253
+ if (env->ShouldPreserveEnvOnReport ()) {
254
+ PrintEnvironmentVariables (&writer);
255
+ }
252
256
PrintSystemInformation (&writer);
253
257
254
258
writer.json_objectend ();
@@ -694,8 +698,7 @@ static void PrintResourceUsage(JSONWriter* writer) {
694
698
#endif // RUSAGE_THREAD
695
699
}
696
700
697
- // Report operating system information.
698
- static void PrintSystemInformation (JSONWriter* writer) {
701
+ static void PrintEnvironmentVariables (JSONWriter* writer) {
699
702
uv_env_item_t * envitems;
700
703
int envcount;
701
704
int r;
@@ -715,7 +718,10 @@ static void PrintSystemInformation(JSONWriter* writer) {
715
718
}
716
719
717
720
writer->json_objectend ();
721
+ }
718
722
723
+ // Report operating system information.
724
+ static void PrintSystemInformation (JSONWriter* writer) {
719
725
#ifndef _WIN32
720
726
static struct {
721
727
const char * description;
0 commit comments