This commit is contained in:
Philip Peterson 2025-04-13 02:56:31 -07:00
parent d86fcc90ed
commit 4a49bf2cbf
No known key found for this signature in database
GPG key ID: 354311183FC6519B

7
bin/cp-snapshot.js vendored
View file

@ -1,5 +1,6 @@
const path = require('path');
const fs = require('fs');
const fsPromises = require('fs/promises');
const {Arch} = require('electron-builder');
function copySnapshot(pathToElectron, archToCopy) {
@ -72,9 +73,9 @@ exec "$SCRIPT_DIR/${params.packager.executableName}.bin" "--no-sandbox" "$@"
`
try {
await fs.rename(executable, executable + '.bin')
await fs.writeFile(executable, loaderScript)
await fs.chmod(executable, 0o755)
await fsPromises.rename(executable, executable + '.bin')
await fsPromises.writeFile(executable, loaderScript)
await fsPromises.chmod(executable, 0o755)
} catch (e) {
console.error('failed to create loader for sandbox fix: ' + e.message)
throw new Error('Failed to create loader for sandbox fix')