Merge pull request #14128 from Homebrew/codespaces_prebuild_fix

devcontainer/on-create-command: fix prebuild handling.
This commit is contained in:
Mike McQuaid 2022-11-09 16:53:41 +00:00 committed by GitHub
commit eaf887656f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,8 +5,9 @@ set -e
sudo chmod -R g-w,o-w /home/linuxbrew sudo chmod -R g-w,o-w /home/linuxbrew
# everything below is too slow to do unless prebuilding so skip it # everything below is too slow to do unless prebuilding so skip it
if [ -z "$CODESPACES_PREBUILD_TOKEN" ] CODESPACES_ACTION_NAME="$(cat /workspaces/.codespaces/shared/environment-variables.json | jq -r '.ACTION_NAME')"
then if [ "$CODESPACES_ACTION_NAME" != "createPrebuildTemplate" ];
echo "Skipping slow items, not prebuilding."
exit 0 exit 0
fi fi