File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,12 @@ public function handle(): void
5252
5353 private function processEnvironment (): static
5454 {
55+ $ locationCommand = 'which ' ;
56+
57+ if (PHP_OS_FAMILY === 'Windows ' ) {
58+ $ locationCommand = 'where ' ;
59+ }
60+
5561 info ('Generating Environment Data... ' );
5662 $ environment = [
5763 'PHP ' => [
@@ -65,8 +71,11 @@ private function processEnvironment(): static
6571 ],
6672 'Node ' => [
6773 'Version ' => trim (Process::run ('node -v ' )->output ()),
68- 'Path ' => trim (Process::run ('which node ' )->output ()),
69- 'NPM ' => trim (Process::run ('npm -v ' )->output ()),
74+ 'Path ' => trim (Process::run ("$ locationCommand node " )->output ()),
75+ ],
76+ 'NPM ' => [
77+ 'Version ' => trim (Process::run ('npm -v ' )->output ()),
78+ 'Path ' => trim (Process::run ("$ locationCommand npm " )->output ()),
7079 ],
7180 'OperatingSystem ' => PHP_OS ,
7281 ];
You can’t perform that action at this time.
0 commit comments