Merge pull request #13152 from github/max-schaefer/unsafe-shell-command-construction-examples-sync

JavaScript: Use synchronous APIs in examples for js/shell-command-constructed-from-input.
This commit is contained in:
Max Schaefer
2023-05-12 16:50:25 +01:00
committed by GitHub
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);
}