add missing fs ops

This commit is contained in:
Simon Knott 2024-11-29 12:32:31 +01:00
parent 5ce5fc0e20
commit 3e283eb7d1
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -170,6 +170,13 @@ async function downloadBrotli(title: string, browserDirectory: string, url: stri
throw new Error(`Download failed: size mismatch, file size: ${downloadedBytes}, expected size: ${totalBytes} URL: ${url}`); throw new Error(`Download failed: size mismatch, file size: ${downloadedBytes}, expected size: ${totalBytes} URL: ${url}`);
debugLogger.log('install', `-- download complete, size: ${downloadedBytes}`); debugLogger.log('install', `-- download complete, size: ${downloadedBytes}`);
if (executablePath) {
debugLogger.log('install', `fixing permissions at ${executablePath}`);
await fs.promises.chmod(executablePath, 0o755);
}
await fs.promises.writeFile(browserDirectoryToMarkerFilePath(browserDirectory), '');
return { error: null }; return { error: null };
} catch (error) { } catch (error) {
debugLogger.log('install', `-- ${error.message}`); debugLogger.log('install', `-- ${error.message}`);