JavaScript: Use synchronous APIs in examples for js/shell-command-constructed-from-input.

This commit is contained in:
Max Schaefer
2023-05-12 14:42:11 +01:00
committed by GitHub
parent d27f84e34e
commit 2e7eb50319
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
var cp = require("child_process");
module.exports = function download(path, callback) {
cp.exec("wget " + path, callback);
cp.execSync("wget " + path, callback);
}

View File

@@ -1,5 +1,5 @@
var cp = require("child_process");
module.exports = function download(path, callback) {
cp.execFile("wget", [path], callback);
cp.execFileSync("wget", [path], callback);
}