File tree 2 files changed +15
-14
lines changed
2 files changed +15
-14
lines changed Original file line number Diff line number Diff line change @@ -42,11 +42,12 @@ describe('Utils tests', () => {
42
42
it ( 'checking asyncForEach' , async ( ) => {
43
43
const array : Array < string > = [ 'a' , 'b' , 'c' ] ;
44
44
let concat = '' ;
45
- await utils . asyncForEach ( array , async function (
46
- str : string
47
- ) : Promise < void > {
48
- concat += str ;
49
- } ) ;
45
+ await utils . asyncForEach (
46
+ array ,
47
+ async function ( str : string ) : Promise < void > {
48
+ concat += str ;
49
+ }
50
+ ) ;
50
51
expect ( concat ) . toBe ( 'abc' ) ;
51
52
} ) ;
52
53
@@ -83,12 +84,12 @@ describe('Utils tests', () => {
83
84
const runner_dir : string = process . env [ 'RUNNER_TOOL_CACHE' ] || '' ;
84
85
const script_path : string = path . join ( runner_dir , 'test.sh' ) ;
85
86
await utils . writeScript ( 'test.sh' , testString ) ;
86
- await fs . readFile ( script_path , function (
87
- error : Error | null ,
88
- data : Buffer
89
- ) {
90
- expect ( testString ) . toBe ( data . toString ( ) ) ;
91
- } ) ;
87
+ await fs . readFile (
88
+ script_path ,
89
+ function ( error : Error | null , data : Buffer ) {
90
+ expect ( testString ) . toBe ( data . toString ( ) ) ;
91
+ }
92
+ ) ;
92
93
await cleanup ( script_path ) ;
93
94
} ) ;
94
95
Original file line number Diff line number Diff line change @@ -102,10 +102,10 @@ add_php() {
102
102
brew tap --shallow shivammathur/php
103
103
fi
104
104
update_dependencies
105
- if brew list php@ " $version " 2> /dev/null | grep -q " Error " && [ " $action " != " upgrade" ]; then
106
- brew unlink php@" $version "
105
+ if ! [[ " $( find " $( brew --cellar ) " / php/ -maxdepth 1 -name " $version * " | wc -l 2> /dev/null) " -eq 0 ]] && [ " $action " != " upgrade" ]; then
106
+ brew unlink shivammathur/php/ php@" $version "
107
107
else
108
- brew " $action " shivammathur/php/php@" $version "
108
+ brew upgrade " shivammathur/php/php@ $version " 2> /dev/null || brew install " shivammathur/php/php@$version "
109
109
fi
110
110
brew link --force --overwrite php@" $version "
111
111
}
You can’t perform that action at this time.
0 commit comments