Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6947811

Browse files
chore(pkgbuild): delete existing app during preinstall,spctl --assess during postinstall (#112)
Relates to#83.It looks like deleting the app does indeed kill the NE process, so we should do that during `preinstall`.In case the XPC issue we've been seeing is due to a race between the app being opened, and Gatekeeper ingesting the notarization ticket, we'll also force Gatekeeper to read the ticket by running `spctl -a` on the app bundle, and the extension bundle. The latter always fails, but an attempt to read it can't hurt.
1 parente8e4004 commit6947811

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

‎pkgbuild/scripts/postinstall

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
RUNNING_MARKER_FILE="/tmp/coder_desktop_running"
44
VPN_MARKER_FILE="/tmp/coder_vpn_was_running"
55

6+
# Before this script, or the user, opens the app, make sure
7+
# Gatekeeper has ingested the notarization ticket.
8+
spctl -avvv"/Applications/Coder Desktop.app"
9+
# spctl can't assess non-apps, so this will always return a non-zero exit code,
10+
# but the error message implies at minimum the signature of the extension was
11+
# checked.
12+
spctl -avvv"/Applications/Coder Desktop.app/Contents/Library/SystemExtensions/com.coder.Coder-Desktop.VPN.systemextension"||true
13+
614
# Restart Coder Desktop if it was running before
715
if [-f"$RUNNING_MARKER_FILE" ];then
816
echo"Starting Coder Desktop..."

‎pkgbuild/scripts/preinstall

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,11 @@ echo "Asking com.coder.Coder-Desktop to quit..."
3535
osascript -e'if app id "com.coder.Coder-Desktop" is running then' -e'quit app id "com.coder.Coder-Desktop"' -e'end if'
3636
echo"Done."
3737

38+
APP="/Applications/Coder Desktop.app"
39+
if [-d"$APP" ];then
40+
echo"Deleting Coder Desktop..."
41+
rm -rf"$APP"
42+
echo"Done."
43+
fi
44+
3845
exit 0

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp