Skip to content

Commit

Permalink
Add warning that function in spawn.js is deprecated (apache#481)
Browse files Browse the repository at this point in the history
Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
Co-authored-by: Oliver Salzburg <oliver.salzburg@gmail.com>
  • Loading branch information
2 people authored and erisu committed Jan 16, 2019
1 parent 7823e38 commit 52b6563
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/templates/scripts/cordova/lib/spawn.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ var proc = require('child_process');
* @deprecated Use `require('cordova-common').superspawn` instead.
*/
module.exports = function (cmd, args, opt_cwd) {
console.warn(
'This function is deprecated, may be removed from a future release. ' +
"Use `require('cordova-common').superspawn` instead.");
var d = Q.defer();
try {
var child = proc.spawn(cmd, args, {cwd: opt_cwd, stdio: 'inherit'});
Expand Down

0 comments on commit 52b6563

Please sign in to comment.