Skip to content

Commit

Permalink
core: use readFileAsString instead of cat for os-release
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jan 19, 2025
1 parent 086fd7e commit 0a0e56d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/helpers/MiscFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 0a0e56d

Please sign in to comment.