Add wrapper script
This commit is contained in:
parent
034227d993
commit
9a5b26e975
|
@ -11,8 +11,9 @@
|
|||
"output": "dist",
|
||||
"app": "build"
|
||||
},
|
||||
"beforePack": "scripts/before-pack.js",
|
||||
"afterSign": "scripts/after-sign.js",
|
||||
"asarUnpack": ["**/*.node"],
|
||||
"asarUnpack": ["**/*.node", "**/bw-coredump-wrapper.sh"],
|
||||
"files": [
|
||||
"**/*",
|
||||
"!**/node_modules/@bitwarden/desktop-native/**/*",
|
||||
|
@ -22,7 +23,9 @@
|
|||
"!**/node_modules/argon2/**/*",
|
||||
"**/node_modules/argon2/argon2.js",
|
||||
"**/node_modules/argon2/package.json",
|
||||
"**/node_modules/argon2/lib/binding/napi-v3/argon2.node"
|
||||
"**/node_modules/argon2/lib/binding/napi-v3/argon2.node",
|
||||
|
||||
"resources/bw-coredump-wrapper.sh"
|
||||
],
|
||||
"electronVersion": "28.3.1",
|
||||
"generateUpdatesFilesForAllChannels": true,
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
/* 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("## Before pack");
|
||||
|
||||
const targetPath = path.join(context.outDir, "../build", "bw-coredump-wrapper.sh");
|
||||
const wrapperScript = path.join(__dirname, "./bw-coredump-wrapper.sh");
|
||||
|
||||
if (context.electronPlatformName === "linux") {
|
||||
fse.copySync(wrapperScript, targetPath);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
# disable coredumps
|
||||
ulimit -c 0
|
||||
bitwarden
|
Loading…
Reference in New Issue