Skip to content

Commit

Permalink
set filemode for chrome-sandbox to reflect the permissions it needs (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
shiftkey committed Jun 2, 2024
1 parent 145ad94 commit 250d913
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion script/package.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable no-sync */

import * as cp from 'child_process'
import { createReadStream } from 'fs'
import { chmodSync, createReadStream } from 'fs'
import { writeFile } from 'fs/promises'
import * as path from 'path'
import * as electronInstaller from 'electron-winstaller'
Expand Down Expand Up @@ -30,6 +30,7 @@ import { getVersion } from '../app/package-info'
import { rename } from 'fs/promises'
import { join } from 'path'
import { assertNonNullable } from '../app/src/lib/fatal-error'
import { pathExistsSync } from 'fs-extra'

const distPath = getDistPath()
const productName = getProductName()
Expand Down Expand Up @@ -217,6 +218,14 @@ function generateChecksums() {
}

function packageLinux() {
const helperPath = path.join(getDistPath(), 'chrome-sandbox')
const exists = pathExistsSync(helperPath)

if (exists) {
console.log('Updating file mode for chrome-sandbox…')
chmodSync(helperPath, 0o4755)
}

const electronBuilder = path.resolve(
__dirname,
'..',
Expand Down

0 comments on commit 250d913

Please sign in to comment.