File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed
Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 55 "shell-version" : [
66 " 45"
77 ],
8- "version" : 6 ,
8+ "version" : 7 ,
99 "url" : " https://github.com/rahulhaque/php-laravel-valet-gnome-shell-extension" ,
1010 "settings-schema" : " org.gnome.shell.extensions.php-laravel-valet"
1111}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11import GLib from 'gi://GLib' ;
2- import Bytes from 'gi://GLib/Bytes' ;
32
43export function safeSpawn ( cmd ) {
54 try {
@@ -16,19 +15,19 @@ export function shellSpawn(cmd) {
1615
1716export function phpVersion ( ) {
1817 const res = safeSpawn ( '/bin/bash -c "php -v | grep -Po \'PHP\\s+\\d+.\\d+(?:(.\\d+))?\'"' ) ;
19- if ( res [ 3 ] == 0 ) return Bytes . toString ( res [ 1 ] ) . replace ( / \n $ / , '' ) ;
18+ if ( res [ 3 ] == 0 ) return String . fromCharCode ( ... res [ 1 ] ) . replace ( / \n $ / , '' ) ;
2019 return false ;
2120}
2221
2322export function phpList ( ) {
2423 const res = safeSpawn ( 'ls /etc/php' ) ;
25- if ( res [ 3 ] == 0 ) return Bytes . toString ( res [ 1 ] ) . split ( '\n' ) . filter ( item => ! ! item ) . reverse ( ) ;
24+ if ( res [ 3 ] == 0 ) return String . fromCharCode ( ... res [ 1 ] ) . split ( '\n' ) . filter ( item => ! ! item ) . reverse ( ) ;
2625 return false ;
2726}
2827
2928export function valetStatus ( ) {
3029 const res = safeSpawn ( '/bin/bash -c "valet --version && valet status"' ) ;
31- if ( res [ 3 ] == 0 ) return Bytes . toString ( res [ 1 ] ) . split ( '\n' ) . filter ( item => ! ! item ) ;
30+ if ( res [ 3 ] == 0 ) return String . fromCharCode ( ... res [ 1 ] ) . split ( '\n' ) . filter ( item => ! ! item ) ;
3231 return false ;
3332}
3433
You can’t perform that action at this time.
0 commit comments