From 4a49bf2cbfce8cce363868e9dbdfd02f15786640 Mon Sep 17 00:00:00 2001 From: Philip Peterson Date: Sun, 13 Apr 2025 02:56:31 -0700 Subject: [PATCH] wip --- bin/cp-snapshot.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/cp-snapshot.js b/bin/cp-snapshot.js index 1964004a..3bcfc5dc 100644 --- a/bin/cp-snapshot.js +++ b/bin/cp-snapshot.js @@ -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')