fix: admin/home: ugly error if wmic fails #675
Massimo Melina committed
Jul 9, 2024 at 12:28 UTC
950c67f23e6cde22d1da43075112fdfed8181b9e
1 file changed
+4
-1
src/util-os.ts
+4
-1
@@ -80,7 +80,10 @@ async function getWindowsServicePids() {
80
return _.uniq(res.split('\n').slice(1).map(x => Number(x.trim())))
81
}
82
83
-export const RUNNING_AS_SERVICE = IS_WINDOWS && getWindowsServicePids().then(x => x.includes(pid))
83
+export const RUNNING_AS_SERVICE = IS_WINDOWS && getWindowsServicePids().then(x => x.includes(pid), e => {
84
+ console.log("couldn't determine if we are running as a service")
85
+ console.debug(e)
86
+})
87
88
function parseKeyValueObjects<T extends string>(all: string, keySep='=', lineSep='\n', objectSep=/\n\n+/) {
89
return all.split(objectSep).map(obj =>