Skip to content

Commit

Permalink
make sure the user associated with the machine token can access the site
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Jul 21, 2023
1 parent b9aecd1 commit c42d082
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .bin/set-up-globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,16 @@ set -ex
TERMINUS_PLUGINS_DIR=.. terminus list -n remote

set +ex
echo "Test site is $TERMINUS_SITE"
echo "Logging in with a machine token:"
terminus auth:login -n --machine-token="$TERMINUS_TOKEN"
terminus whoami

# Check if TERMINUS_SITE is not empty.
if [ -z "$TERMINUS_SITE" ]; then
echo "TERMINUS_SITE is not defined. Please set it to the name of your Pantheon site if needed for this step."
else
echo "Test site is $TERMINUS_SITE"
# Make sure the current user has access to the site.
terminus site:info "$TERMINUS_SITE"
terminus wp "$TERMINUS_SITE.dev" -- core version
fi

0 comments on commit c42d082

Please sign in to comment.