Skip to content

Commit

Permalink
Merge 61c534c into bd1ac26
Browse files Browse the repository at this point in the history
  • Loading branch information
katsanva committed Oct 20, 2018
2 parents bd1ac26 + 61c534c commit 11d7cc2
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/health.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ const getMemoryInfo = () => {
return mem;
};

const getUserInfo = () => {
try {
return os.userInfo();
} catch (e) {
return {};
}
};

const getOsInfo = () => {
return {
uptime: os.uptime(),
Expand All @@ -50,7 +58,7 @@ const getOsInfo = () => {
hostname: os.hostname(),
arch: os.arch(),
platform: os.platform(),
user: os.userInfo()
user: getUserInfo()
};
};

Expand Down

0 comments on commit 11d7cc2

Please sign in to comment.