File tree 2 files changed +6
-4
lines changed
2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 9
9
use Illuminate \Support \Facades \File ;
10
10
use Illuminate \Support \Facades \Process ;
11
11
12
+ use Native \Laravel \Support \Environment ;
12
13
use function Laravel \Prompts \error ;
13
14
use function Laravel \Prompts \info ;
14
15
use function Laravel \Prompts \intro ;
@@ -53,7 +54,7 @@ private function processEnvironment(): static
53
54
{
54
55
$ locationCommand = 'which ' ;
55
56
56
- if (PHP_OS_FAMILY === ' Windows ' ) {
57
+ if (Environment:: isWindows () ) {
57
58
$ locationCommand = 'where ' ;
58
59
}
59
60
@@ -154,9 +155,9 @@ private function outputToClipboard(): void
154
155
$ json = json_encode ($ this ->debugInfo ->toArray (), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES );
155
156
156
157
// Copy json to clipboard
157
- if (PHP_OS_FAMILY === ' Windows ' ) {
158
+ if (Environment:: isWindows () ) {
158
159
Process::run ('echo ' .escapeshellarg ($ json ).' | clip ' );
159
- } elseif (PHP_OS_FAMILY === ' Linux ' ) {
160
+ } elseif (Environment:: isLinux () ) {
160
161
Process::run ('echo ' .escapeshellarg ($ json ).' | xclip -selection clipboard ' );
161
162
} else {
162
163
Process::run ('echo ' .escapeshellarg ($ json ).' | pbcopy ' );
Original file line number Diff line number Diff line change 4
4
5
5
use Native \Laravel \Client \Client ;
6
6
use Native \Laravel \DataObjects \Printer ;
7
+ use Native \Laravel \Support \Environment ;
7
8
use Native \Laravel \Support \Timezones ;
8
9
9
10
class System
@@ -79,7 +80,7 @@ public function timezone(): string
79
80
{
80
81
$ timezones = new Timezones ;
81
82
82
- if (PHP_OS_FAMILY === ' Windows ' ) {
83
+ if (Environment:: isWindows () ) {
83
84
$ timezone = $ timezones ->translateFromWindowsString (exec ('tzutil /g ' ));
84
85
} else {
85
86
$ timezone = $ timezones ->translateFromAbbreviatedString (exec ('date +%Z ' ));
You can’t perform that action at this time.
0 commit comments