Skip to content

Commit 4598745

Browse files
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>
1 parent af199ab commit 4598745

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/helpers/printVersions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { exec } from "node:child_process";
2+
import { readFile } from "node:fs";
23
import { version } from "../../package.json";
34

45
console.log(`ConvertX v${version}`);
56

67
if (process.env.NODE_ENV === "production") {
7-
exec("cat /etc/os-release", (error, stdout) => {
8+
readFile("/etc/os-release", "utf8", (error, stdout) => {
89
if (error) {
910
console.error("Not running on docker, this is not supported.");
1011
}

0 commit comments

Comments
 (0)