Potential fix for code scanning alert no. 6: Unnecessary use of cat process (#473)

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
This commit is contained in:
Emrik Östling
2025-12-14 20:32:56 +01:00
committed by GitHub
parent af199ab8bb
commit 4598745956

View File

@@ -1,10 +1,11 @@
import { exec } from "node:child_process";
import { readFile } from "node:fs";
import { version } from "../../package.json";
console.log(`ConvertX v${version}`);
if (process.env.NODE_ENV === "production") {
exec("cat /etc/os-release", (error, stdout) => {
readFile("/etc/os-release", "utf8", (error, stdout) => {
if (error) {
console.error("Not running on docker, this is not supported.");
}