File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed
Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -119,16 +119,11 @@ public function start(): void
119119 // do we really have timeout here?
120120 if (static ::$ hasGnuCoreUtils === null ) {
121121 // haven't checked before; check
122- $ tmpOut = [];
123- if (!exec ("command -v timeout || command -v gtimeout " , $ tmpOut )) {
124- // can't even check this
125- throw new RuntimeException ("AsyncTask failed to check whether GNU coreutils is installed " );
126- }
127- // extract details
128- $ cmdName = $ tmpOut [0 ] ?? null ;
129- static ::$ hasGnuCoreUtils = $ cmdName ? true : false ;
122+ $ tmpOut = exec ("command -v timeout || command -v gtimeout " );
123+ $ cmdName = !empty ($ tmpOut ) ? $ tmpOut : null ;
124+ unset($ tmpOut );
125+ static ::$ hasGnuCoreUtils = $ cmdName !== null ;
130126 static ::$ timeoutCmdName = $ cmdName ;
131- unset($ cmdName );
132127 }
133128 if (static ::$ hasGnuCoreUtils === false ) {
134129 // can't do anything without GNU coreutils!
You can’t perform that action at this time.
0 commit comments