Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ PHP projects mostly are Web-Applications. Many Web-Applications also need a fron
modern Web-Development there often a whole build-chain connected to the frontend, so you can compile e.g. your scss, build
your JavaScript with webpack and optimize your images.

This plugin provides a way to automatically download and installthe right version of node.js, npm and yarn. The binaries
This plugin provides a way to automatically download and install the right version of node.js, npm and yarn. The binaries
are linked to the bin-directory specified in your composer.json.

After that your can use node, npm and yarn in your composer-scripts.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"php": ">=7.1",
"composer/composer": "^1.4 || ^2.0",
"composer-plugin-api": "^1.0 || ^2.0",
"symfony/process": "^2.7 || >=3.0",
"symfony/process": "~4 || ~5 || ~6",
"symfony/filesystem": ">=2.7"
},
"extra": {
Expand Down
5 changes: 3 additions & 2 deletions src/Installer/NodeInstaller.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ public function install($version)
*/
public function isInstalled()
{
$nodeExecutable = $this->context->getBinDir() . DIRECTORY_SEPARATOR . 'node';

$process = new Process("$nodeExecutable --version");
$process = new Process(["node --version"], $this->context->getBinDir());
$process->setIdleTimeout(null);
$process->setTimeout(null);
$process->run();

if ($process->isSuccessful()) {
Expand Down