mirror of
https://github.com/C4illin/ConvertX.git
synced 2026-03-03 02:27:00 +00:00
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:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user