Closed cadlec closed 1 year ago
Hello,
Reading Symfony Process Docs there is a note:
In addition to the env vars passed explicitly, processes inherit all the env vars defined in your system.
So this shouldn't be needed. You should look for a reason why it doesn't inherit it.
But anyway, as a workaround instead of patching DefaultProcessBuilder
you could just implement a custom YoutubeDl\Process\ProcessBuilderInterface
where you set your env vars and then provide it to YoutubeDl
as a first argument when constructing, to ensure that it will work always for you even after composer update
.
Thank you @norkunas , your workaround is what I've done and it worked !
Hi!...I've got the error #39 too. And after setting the bin path and python path, it didn't work.
But, I've been able to fix the error by adding this code in DefaultProcessBuilder.php file:
$process = new Process($arguments, null, [ 'SYSTEMROOT' => 'C:\WINDOWS', ])
So, I think we need a way to set the Windows environment variable in order to fix definitely this error.
My proposition is to create a setter for this environment variable. Thanks