finki-main
main
|
Last change
on this file since 81bc7da was 81bc7da, checked in by Klimentina Efremova <klimentina08642@…>, 3 months ago |
|
Initial commit
|
-
Property mode
set to
100644
|
|
File size:
569 bytes
|
| Rev | Line | |
|---|
| [81bc7da] | 1 | // Copyright 2017 Lovell Fuller and others.
|
|---|
| 2 | // SPDX-License-Identifier: Apache-2.0
|
|---|
| 3 |
|
|---|
| 4 | 'use strict';
|
|---|
| 5 |
|
|---|
| 6 | const isLinux = () => process.platform === 'linux';
|
|---|
| 7 |
|
|---|
| 8 | let report = null;
|
|---|
| 9 | const getReport = () => {
|
|---|
| 10 | if (!report) {
|
|---|
| 11 | /* istanbul ignore next */
|
|---|
| 12 | if (isLinux() && process.report) {
|
|---|
| 13 | const orig = process.report.excludeNetwork;
|
|---|
| 14 | process.report.excludeNetwork = true;
|
|---|
| 15 | report = process.report.getReport();
|
|---|
| 16 | process.report.excludeNetwork = orig;
|
|---|
| 17 | } else {
|
|---|
| 18 | report = {};
|
|---|
| 19 | }
|
|---|
| 20 | }
|
|---|
| 21 | return report;
|
|---|
| 22 | };
|
|---|
| 23 |
|
|---|
| 24 | module.exports = { isLinux, getReport };
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.