Skip to content

Commit

Permalink
installer/snap: fix CLI args embedding
Browse files Browse the repository at this point in the history
* should have been a part of 1447966
  • Loading branch information
vladimiry committed May 27, 2020
1 parent 5622e79 commit eaa99a6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/electron-builder/build-snap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ function addCommandLineArgs({packageDir}: { packageDir: string; }): void {
const shFile = path.join(packageDir, "./command.sh");
const shContentOriginal = fs.readFileSync(shFile).toString();
const shContentPatched = (() => {
const searchValue = `exec $SNAP/bin/desktop-launch "$SNAP/${BINARY_NAME}"`;
const replaceWith = `${searchValue} --js-flags="--max-old-space-size=6144" $@`;
// eslint-disable-next-line max-len
const searchValue = `exec "$SNAP/desktop-init.sh" "$SNAP/desktop-common.sh" "$SNAP/desktop-gnome-specific.sh" "$SNAP/${BINARY_NAME}" "$@" --no-sandbox`;
const replaceWith = `${searchValue} --js-flags="--max-old-space-size=6144"`;
return shContentOriginal.replace(searchValue, replaceWith);
})();

Expand Down

0 comments on commit eaa99a6

Please sign in to comment.