mirror of
https://github.com/bitwarden/browser
synced 2025-12-11 22:03:36 +00:00
[PM-13361] Fix DDG backwards compat (#11804)
This commit is contained in:
@@ -77,9 +77,13 @@
|
|||||||
{
|
{
|
||||||
"from": "desktop_native/dist/desktop_proxy.${platform}-${arch}",
|
"from": "desktop_native/dist/desktop_proxy.${platform}-${arch}",
|
||||||
"to": "MacOS/desktop_proxy"
|
"to": "MacOS/desktop_proxy"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"from": "desktop_native/dist/desktop_proxy.${platform}-${arch}",
|
||||||
|
"to": "MacOS/desktop_proxy.inherit"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"signIgnore": ["MacOS/desktop_proxy"],
|
"signIgnore": ["MacOS/desktop_proxy", "MacOS/desktop_proxy.inherit"],
|
||||||
"target": ["dmg", "zip"]
|
"target": ["dmg", "zip"]
|
||||||
},
|
},
|
||||||
"win": {
|
"win": {
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||||
|
<plist version="1.0">
|
||||||
|
<dict>
|
||||||
|
<key>com.apple.security.app-sandbox</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.inherit</key>
|
||||||
|
<true/>
|
||||||
|
</dict>
|
||||||
|
</plist>
|
||||||
@@ -70,6 +70,18 @@ async function run(context) {
|
|||||||
child_process.execSync(
|
child_process.execSync(
|
||||||
`codesign -s '${id}' -i ${packageId} -f --timestamp --options runtime --entitlements ${entitlementsPath} ${proxyPath}`,
|
`codesign -s '${id}' -i ${packageId} -f --timestamp --options runtime --entitlements ${entitlementsPath} ${proxyPath}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const inheritProxyPath = path.join(appPath, "Contents", "MacOS", "desktop_proxy.inherit");
|
||||||
|
const inheritEntitlementsName = "entitlements.desktop_proxy.inherit.plist";
|
||||||
|
const inheritEntitlementsPath = path.join(
|
||||||
|
__dirname,
|
||||||
|
"..",
|
||||||
|
"resources",
|
||||||
|
inheritEntitlementsName,
|
||||||
|
);
|
||||||
|
child_process.execSync(
|
||||||
|
`codesign -s '${id}' -i ${packageId} -f --timestamp --options runtime --entitlements ${inheritEntitlementsPath} ${inheritProxyPath}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -16,16 +16,24 @@ if (
|
|||||||
app.dock.hide();
|
app.dock.hide();
|
||||||
});
|
});
|
||||||
|
|
||||||
const proc = spawn(path.join(process.execPath, "..", "desktop_proxy"), process.argv.slice(1), {
|
const proc = spawn(
|
||||||
cwd: process.cwd(),
|
path.join(process.execPath, "..", "desktop_proxy.inherit"),
|
||||||
stdio: "inherit",
|
process.argv.slice(1),
|
||||||
shell: false,
|
{
|
||||||
});
|
cwd: process.cwd(),
|
||||||
|
stdio: "inherit",
|
||||||
|
shell: false,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
proc.on("exit", () => {
|
proc.on("exit", (...args) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.error("Proxy process exited", args);
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
});
|
});
|
||||||
proc.on("error", () => {
|
proc.on("error", (...args) => {
|
||||||
|
// eslint-disable-next-line no-console
|
||||||
|
console.error("Proxy process errored", args);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user