mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 16:13:12 +09:00
Merge pull request #960 from bbassie/feature/silence-dep0190
Silence the deprecation warning on install
This commit is contained in:
2 files changed
+5
-7
No files matched your search
@@ -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,
|
||||||
|
|
||||||
|
|||||||
@@ -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 };
|
||||||
|
|||||||
Reference in new issue
Block a user