mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 15:14:52 +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) {
|
||||
const escaped = args.map(escapeArg);
|
||||
logger.verbose(`executing ${cmd} ${escaped.join(" ")}`);
|
||||
const command = [cmd, ...args.map(escapeArg)].join(" ");
|
||||
logger.verbose(`executing ${command}`);
|
||||
return new Promise((resolve, reject) => {
|
||||
let child = child_process.execFile(
|
||||
cmd,
|
||||
escaped,
|
||||
command,
|
||||
{
|
||||
shell: true,
|
||||
|
||||
|
||||
@@ -8,10 +8,9 @@ const { escapeArg } = require("../../packages/create/escape_arg");
|
||||
const execFile = util.promisify(child_process.execFile);
|
||||
|
||||
async function exec(file, args) {
|
||||
const command = [file, ...args.map(escapeArg)].join(" ");
|
||||
const { stdout, stderr } = await execFile(
|
||||
file,
|
||||
args.map(escapeArg),
|
||||
|
||||
command,
|
||||
{ shell: true, cwd: __dirname, env: { ...process.env, pct: "%"} }
|
||||
);
|
||||
return { stdout: JSON.parse(stdout), stderr };
|
||||
|
||||
Reference in new issue
Block a user