Address Sonar warnings and harden runtime
All checks were successful
build-and-push / lint (push) Successful in 4s
build-and-push / sonar (push) Successful in 12s
build-and-push / docker (push) Successful in 1m13s

This commit is contained in:
nocci 2025-12-30 14:54:14 +00:00
parent 9e2bc89ff2
commit 69282c63d5
5 changed files with 25 additions and 9 deletions

View file

@ -1,10 +1,12 @@
// check if running the latest version
import { log } from 'console';
import { execFile } from 'child_process';
import { execFile } from 'node:child_process';
const gitBin = process.env.GIT_BIN || '/usr/bin/git';
const runGit = (...args) => new Promise((resolve, reject) => {
execFile('git', args, { cwd: process.cwd() }, (error, stdout, stderr) => {
execFile(gitBin, args, { cwd: process.cwd() }, (error, stdout, stderr) => {
if (stderr) console.error(`stderr: ${stderr}`);
// if (stdout) console.log(`stdout: ${stdout}`);
if (error) {