Merge pull request #960 from bbassie/feature/silence-dep0190

Silence the deprecation warning on install
This commit is contained in:
Cooldude2606 authored and GitHub committed 2026-07-25 14:51:59 +01:00
commit 40f1cf6332
2 files changed
+5 -7

No files matched your search

+3 -4
View File
@@ -118,12 +118,11 @@ async function safeOutputFile(file, data, options={}) {
} }
async function execFile(cmd, args) { async function execFile(cmd, args) {
const escaped = args.map(escapeArg); const command = [cmd, ...args.map(escapeArg)].join(" ");
logger.verbose(`executing ${cmd} ${escaped.join(" ")}`); logger.verbose(`executing ${command}`);
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
let child = child_process.execFile( let child = child_process.execFile(
cmd, command,
escaped,
{ {
shell: true, shell: true,
+2 -3
View File
@@ -8,10 +8,9 @@ const { escapeArg } = require("../../packages/create/escape_arg");
const execFile = util.promisify(child_process.execFile); const execFile = util.promisify(child_process.execFile);
async function exec(file, args) { async function exec(file, args) {
const command = [file, ...args.map(escapeArg)].join(" ");
const { stdout, stderr } = await execFile( const { stdout, stderr } = await execFile(
file, command,
args.map(escapeArg),
{ shell: true, cwd: __dirname, env: { ...process.env, pct: "%"} } { shell: true, cwd: __dirname, env: { ...process.env, pct: "%"} }
); );
return { stdout: JSON.parse(stdout), stderr }; return { stdout: JSON.parse(stdout), stderr };