From 4115b5e1729e7e123eea36464080e29003651669 Mon Sep 17 00:00:00 2001 From: Przemyslaw Pluta Date: Sun, 7 Sep 2014 11:15:44 +0100 Subject: [PATCH] fix for missing env variable in win If the PATH is not provided to `python` executable in env variables then youtube-dl fails. This will enable parent to pass process env variables. Will add proper python search future within youtube-dl later on. --- lib/youtube-dl.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/youtube-dl.js b/lib/youtube-dl.js index 9adf8fd..8703f4c 100644 --- a/lib/youtube-dl.js +++ b/lib/youtube-dl.js @@ -95,7 +95,7 @@ function call(video, args1, args2, options, callback) { var opt = [file, args]; - if (isWin) { opt = ['python', [file].concat(args)]; } + if (isWin) { opt = [process.env.PYTHON || 'python', [file].concat(args)]; } // Call youtube-dl. execFile(opt[0], opt[1], options, function(err, stdout, stderr) {