From 0a0e56d99c3b5f900ec561b3fe9a3c8a64fe1217 Mon Sep 17 00:00:00 2001 From: vaxerski Date: Sun, 19 Jan 2025 14:02:47 +0100 Subject: [PATCH] core: use readFileAsString instead of cat for os-release --- src/helpers/MiscFunctions.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/MiscFunctions.cpp b/src/helpers/MiscFunctions.cpp index fafe1811234..5ebb0842c5c 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 #include #include @@ -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) {