mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-27 21:26:38 +00:00
patch: fix sudo for mac catalina and above
This commit is contained in:
parent
a61652a0b8
commit
50adc32356
@ -41,6 +41,10 @@ const config: ForgeConfig = {
|
|||||||
appCopyright: 'Copyright 2016-2023 Balena Ltd',
|
appCopyright: 'Copyright 2016-2023 Balena Ltd',
|
||||||
darwinDarkModeSupport: true,
|
darwinDarkModeSupport: true,
|
||||||
protocols: [{ name: 'etcher', schemes: ['etcher'] }],
|
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: {
|
osxSign: {
|
||||||
optionsForFile: () => ({
|
optionsForFile: () => ({
|
||||||
entitlements: './entitlements.mac.plist',
|
entitlements: './entitlements.mac.plist',
|
||||||
|
@ -19,7 +19,6 @@ import { join } from 'path';
|
|||||||
import { env } from 'process';
|
import { env } from 'process';
|
||||||
import { promisify } from 'util';
|
import { promisify } from 'util';
|
||||||
|
|
||||||
import { getAppPath } from '../get-app-path';
|
|
||||||
import { supportedLocales } from '../../gui/app/i18n';
|
import { supportedLocales } from '../../gui/app/i18n';
|
||||||
|
|
||||||
const execFileAsync = promisify(execFile);
|
const execFileAsync = promisify(execFile);
|
||||||
@ -48,8 +47,7 @@ export async function sudo(
|
|||||||
env: {
|
env: {
|
||||||
PATH: env.PATH,
|
PATH: env.PATH,
|
||||||
SUDO_ASKPASS: join(
|
SUDO_ASKPASS: join(
|
||||||
getAppPath(),
|
process.resourcesPath,
|
||||||
__dirname,
|
|
||||||
`sudo-askpass.osascript-${lang}.js`,
|
`sudo-askpass.osascript-${lang}.js`,
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user