patch: fix sudo for mac catalina and above

This commit is contained in:
Edwin Joassart 2023-12-01 19:26:33 +01:00
parent a61652a0b8
commit 50adc32356
2 changed files with 5 additions and 3 deletions

View File

@ -41,6 +41,10 @@ const config: ForgeConfig = {
appCopyright: 'Copyright 2016-2023 Balena Ltd',
darwinDarkModeSupport: true,
protocols: [{ name: 'etcher', schemes: ['etcher'] }],
extraResource: [
"lib/shared/catalina-sudo/sudo-askpass.osascript-zh.js",
"lib/shared/catalina-sudo/sudo-askpass.osascript-en.js"
],
osxSign: {
optionsForFile: () => ({
entitlements: './entitlements.mac.plist',

View File

@ -19,7 +19,6 @@ import { join } from 'path';
import { env } from 'process';
import { promisify } from 'util';
import { getAppPath } from '../get-app-path';
import { supportedLocales } from '../../gui/app/i18n';
const execFileAsync = promisify(execFile);
@ -48,8 +47,7 @@ export async function sudo(
env: {
PATH: env.PATH,
SUDO_ASKPASS: join(
getAppPath(),
__dirname,
process.resourcesPath,
`sudo-askpass.osascript-${lang}.js`,
),
},