1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-11 10:10:25 +01:00
bitwarden-browser/apps/desktop/scripts/after-pack.js
Todd Martin ed4d481e4d
[PM-7646][PM-5506] Revert IPC changes (#10946)
* Revert "Remove unnecessary plist keys in desktop_proxy (#10933)"

This reverts commit 4dbb036df1.

* Revert "Fix TestFlight errors caused by desktop_proxy (#10928)"

This reverts commit 40cb4b5353.

* Revert "[PM-5506] Enable electron fuses (#10073)"

This reverts commit 78c5e9c706.

* Revert "[PM-7846] Implement a rust based native messaging proxy and IPC system (#9894)"

This reverts commit 55874b72bf.
2024-09-09 09:09:17 -04:00

27 lines
959 B
JavaScript

/* eslint-disable @typescript-eslint/no-var-requires, no-console */
require("dotenv").config();
const path = require("path");
const fse = require("fs-extra");
exports.default = run;
async function run(context) {
console.log("## After pack");
console.log(context);
if (context.electronPlatformName === "linux") {
console.log("Creating memory-protection wrapper script");
const appOutDir = context.appOutDir;
const oldBin = path.join(appOutDir, context.packager.executableName);
const newBin = path.join(appOutDir, "bitwarden-app");
fse.moveSync(oldBin, newBin);
console.log("Moved binary to bitwarden-app");
const wrapperScript = path.join(__dirname, "../resources/memory-dump-wrapper.sh");
const wrapperBin = path.join(appOutDir, context.packager.executableName);
fse.copyFileSync(wrapperScript, wrapperBin);
fse.chmodSync(wrapperBin, "755");
console.log("Copied memory-protection wrapper script");
}
}