Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autobuild: Work around CodeQL-induced build failures #3223

Merged
merged 3 commits into from
Feb 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion mac/deploy_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ build_installer_image() {

# Build installer image

create-dmg \
# When this script is run on Github's CI with CodeQL enabled, CodeQL adds dynamic library
# shims via environment variables, so that it can monitor the compilation of code.
# In order for these settings to propagate to compilation called via shell/bash scripts,
# the CodeQL libs seem automatically to create the same environment variables in sub-shells,
# even when called via 'env'. This was determined by experimentation.
# Unfortunately, the CodeQL libraries are not compatible with the hdiutil program called
# by create-dmg. In order to prevent the automatic propagation of the environment, we use
# sudo to the same user in order to invoke create-dmg with a guaranteed clean environment.
#
# /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper.
Comment on lines +123 to +132
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

sudo -u "$USER" create-dmg \
--volname "${client_target_name} Installer" \
--background "${resources_path}/installerbackground.png" \
--window-pos 200 400 \
Expand Down
Loading