File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 99use Illuminate \Support \Facades \File ;
1010use Illuminate \Support \Facades \Process ;
1111
12+ use Native \Laravel \Support \Environment ;
1213use function Laravel \Prompts \error ;
1314use function Laravel \Prompts \info ;
1415use function Laravel \Prompts \intro ;
@@ -53,7 +54,7 @@ private function processEnvironment(): static
5354 {
5455 $ locationCommand = 'which ' ;
5556
56- if (PHP_OS_FAMILY === ' Windows ' ) {
57+ if (Environment:: isWindows () ) {
5758 $ locationCommand = 'where ' ;
5859 }
5960
@@ -154,9 +155,9 @@ private function outputToClipboard(): void
154155 $ json = json_encode ($ this ->debugInfo ->toArray (), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES );
155156
156157 // Copy json to clipboard
157- if (PHP_OS_FAMILY === ' Windows ' ) {
158+ if (Environment:: isWindows () ) {
158159 Process::run ('echo ' .escapeshellarg ($ json ).' | clip ' );
159- } elseif (PHP_OS_FAMILY === ' Linux ' ) {
160+ } elseif (Environment:: isLinux () ) {
160161 Process::run ('echo ' .escapeshellarg ($ json ).' | xclip -selection clipboard ' );
161162 } else {
162163 Process::run ('echo ' .escapeshellarg ($ json ).' | pbcopy ' );
Original file line number Diff line number Diff line change 44
55use Native \Laravel \Client \Client ;
66use Native \Laravel \DataObjects \Printer ;
7+ use Native \Laravel \Support \Environment ;
78use Native \Laravel \Support \Timezones ;
89
910class System
@@ -79,7 +80,7 @@ public function timezone(): string
7980 {
8081 $ timezones = new Timezones ;
8182
82- if (PHP_OS_FAMILY === ' Windows ' ) {
83+ if (Environment:: isWindows () ) {
8384 $ timezone = $ timezones ->translateFromWindowsString (exec ('tzutil /g ' ));
8485 } else {
8586 $ timezone = $ timezones ->translateFromAbbreviatedString (exec ('date +%Z ' ));
You can’t perform that action at this time.
0 commit comments