File tree 1 file changed +11
-2
lines changed
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
52
52
53
53
private function processEnvironment (): static
54
54
{
55
+ $ locationCommand = 'which ' ;
56
+
57
+ if (PHP_OS_FAMILY === 'Windows ' ) {
58
+ $ locationCommand = 'where ' ;
59
+ }
60
+
55
61
info ('Generating Environment Data... ' );
56
62
$ environment = [
57
63
'PHP ' => [
@@ -65,8 +71,11 @@ private function processEnvironment(): static
65
71
],
66
72
'Node ' => [
67
73
'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 ()),
70
79
],
71
80
'OperatingSystem ' => PHP_OS ,
72
81
];
You can’t perform that action at this time.
0 commit comments