You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

process.js 569B

123456789101112131415161718192021222324
  1. // Copyright 2017 Lovell Fuller and others.
  2. // SPDX-License-Identifier: Apache-2.0
  3. 'use strict';
  4. const isLinux = () => process.platform === 'linux';
  5. let report = null;
  6. const getReport = () => {
  7. if (!report) {
  8. /* istanbul ignore next */
  9. if (isLinux() && process.report) {
  10. const orig = process.report.excludeNetwork;
  11. process.report.excludeNetwork = true;
  12. report = process.report.getReport();
  13. process.report.excludeNetwork = orig;
  14. } else {
  15. report = {};
  16. }
  17. }
  18. return report;
  19. };
  20. module.exports = { isLinux, getReport };