summaryrefslogtreecommitdiff
path: root/src/helpers/MiscFunctions.cpp
diff options
context:
space:
mode:
authorvaxerski <vaxry@vaxry.net>2025-01-19 14:02:47 +0100
committervaxerski <vaxry@vaxry.net>2025-01-19 14:04:59 +0100
commit0a0e56d99c3b5f900ec561b3fe9a3c8a64fe1217 (patch)
treebde93808d61d66119365c5467ed62ec021672214 /src/helpers/MiscFunctions.cpp
parent086fd7ece8cc8904909f5a597ab69fe73ecac34c (diff)
core: use readFileAsString instead of cat for os-release
Diffstat (limited to 'src/helpers/MiscFunctions.cpp')
-rw-r--r--src/helpers/MiscFunctions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp
index fafe1811..5ebb0842 100644
--- a/src/helpers/MiscFunctions.cpp
+++ b/src/helpers/MiscFunctions.cpp
@@ -5,6 +5,7 @@
#include "../managers/TokenManager.hpp"
#include "Monitor.hpp"
#include "../config/ConfigManager.hpp"
+#include "fs/FsUtils.hpp"
#include <optional>
#include <cstring>
#include <cmath>
@@ -621,7 +622,7 @@ void logSystemInfo() {
// log etc
Debug::log(LOG, "os-release:");
- Debug::log(NONE, "{}", execAndGet("cat /etc/os-release"));
+ Debug::log(NONE, "{}", NFsUtils::readFileAsString("/etc/os-release").value_or("error"));
}
int64_t getPPIDof(int64_t pid) {