diff --git a/app/GoogleDownloadable.php b/app/GoogleDownloadable.php index 95c7f6e..f8fd8c1 100644 --- a/app/GoogleDownloadable.php +++ b/app/GoogleDownloadable.php @@ -62,19 +62,21 @@ public function download(int $component, string $to, string $platform, bool $unz if ($component & static::BROWSER) { $url = $this->getChromeBrowserURL($platform); $filename = join_paths($to, Str::afterLast($url, '/')); - - download($url, $filename); - - $unzip && unzip($filename); } if ($component & static::DRIVER) { $url = $this->getChromeDriverURL($platform); $filename = join_paths($to, Str::afterLast($url, '/')); + } + + download($url, $filename); - download($url, $filename); + if ($unzip) { + unzip($filename); - $unzip && unzip($filename); + if ($component & static::DRIVER) { + chmod(join_paths(Str::beforeLast($filename, '.'), 'chromedriver'), 0555); + } } }