docs: update @electron/fuses code examples (#39175)
This commit is contained in:
parent
1ca3a7d3c9
commit
2caf08059e
2 changed files with 7 additions and 3 deletions
|
@ -41,7 +41,9 @@ Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of t
|
||||||
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path.
|
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path.
|
||||||
|
|
||||||
```js @ts-nocheck
|
```js @ts-nocheck
|
||||||
require('@electron/fuses').flipFuses(
|
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
|
||||||
|
|
||||||
|
flipFuses(
|
||||||
// E.g. /a/b/Foo.app
|
// E.g. /a/b/Foo.app
|
||||||
pathToPackagedApp,
|
pathToPackagedApp,
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,7 +68,9 @@ The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is
|
||||||
We've made a handy module, [`@electron/fuses`](https://npmjs.com/package/@electron/fuses), to make flipping these fuses easy. Check out the README of that module for more details on usage and potential error cases.
|
We've made a handy module, [`@electron/fuses`](https://npmjs.com/package/@electron/fuses), to make flipping these fuses easy. Check out the README of that module for more details on usage and potential error cases.
|
||||||
|
|
||||||
```js @ts-nocheck
|
```js @ts-nocheck
|
||||||
require('@electron/fuses').flipFuses(
|
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
|
||||||
|
|
||||||
|
flipFuses(
|
||||||
// Path to electron
|
// Path to electron
|
||||||
require('electron'),
|
require('electron'),
|
||||||
// Fuses to flip
|
// Fuses to flip
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue