Address Sonar warnings and harden runtime
This commit is contained in:
parent
9e2bc89ff2
commit
69282c63d5
5 changed files with 25 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue